回答編集履歴
1
sample
test
CHANGED
@@ -13,3 +13,67 @@
|
|
13
13
|
|
14
14
|
|
15
15
|
```
|
16
|
+
|
17
|
+
#sample
|
18
|
+
|
19
|
+
```javascript
|
20
|
+
|
21
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
22
|
+
|
23
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
24
|
+
|
25
|
+
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
|
26
|
+
|
27
|
+
<script>
|
28
|
+
|
29
|
+
$(function(){
|
30
|
+
|
31
|
+
$('#del_dialog').hide();
|
32
|
+
|
33
|
+
$('#del_btn').on('click',function(e){
|
34
|
+
|
35
|
+
e.preventDefault();
|
36
|
+
|
37
|
+
$('#del_dialog').dialog({
|
38
|
+
|
39
|
+
modal:true,
|
40
|
+
|
41
|
+
buttons:{
|
42
|
+
|
43
|
+
"はい":function(){
|
44
|
+
|
45
|
+
$('#del_btn').closest('form').submit();
|
46
|
+
|
47
|
+
},
|
48
|
+
|
49
|
+
"いいえ":function(){
|
50
|
+
|
51
|
+
$(this).dialog("close");
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
});
|
60
|
+
|
61
|
+
});
|
62
|
+
|
63
|
+
</script>
|
64
|
+
|
65
|
+
<form>
|
66
|
+
|
67
|
+
<input type="hidden" name="del" value="1">
|
68
|
+
|
69
|
+
<button type="submit" id="del_btn">削除</button>
|
70
|
+
|
71
|
+
</form>
|
72
|
+
|
73
|
+
<div id="del_dialog">
|
74
|
+
|
75
|
+
<p>この行を削除しますか?</p>
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
```
|