forked from dexteryy/CardKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformcontent.html
40 lines (36 loc) · 1.05 KB
/
formcontent.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<form action="post_result.html" id="ajaxForm1">
<div class="ck-form-unit">
<div class="ckd-item">
<label class="ck-title">章节名</label>
<input type="text" value="" name="a" placeholder="章节名">
</div>
<div class="ckd-item">
<label class="ck-title">笔记内容</label>
<textarea name="b" placeholder="笔记内容"></textarea>
<label><em><a href="index.html" target="_self">测试链接</a></em></label>
</div>
</div>
</form>
<script>
console.info('ajax loaded');
require([
'dollar',
'mo/network',
'cardkit/app'
], function($, net, ck){
ck.modalCard.event.bind('confirmOnThis', function(modal){
modal.showLoading();
net.ajax({
url: 'post_result.html',
type: 'post',
data: new FormData($('#ajaxForm1')[0]), // @TODO android 2.x
processData: false,
contentType: false,
success: function(){
modal.hideLoading();
modal.ok();
}
});
});
});
</script>