回答編集履歴
1
調整版
test
CHANGED
@@ -19,3 +19,121 @@
|
|
19
19
|
```
|
20
20
|
|
21
21
|
から始めてみてください
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# 調整版
|
26
|
+
|
27
|
+
date_scheduled_openクラスのついたボタンを押すとyoubi.phpにpostで自分のvalueを送る
|
28
|
+
|
29
|
+
```javascript
|
30
|
+
|
31
|
+
<script>
|
32
|
+
|
33
|
+
$(function(){
|
34
|
+
|
35
|
+
$('.date_scheduled_open').on('click',function(){
|
36
|
+
|
37
|
+
$.ajax({
|
38
|
+
|
39
|
+
type:'POST',
|
40
|
+
|
41
|
+
dataType: 'json',
|
42
|
+
|
43
|
+
url : 'youbi.php',
|
44
|
+
|
45
|
+
data:{'date_scheduled_open':$(this).val()},
|
46
|
+
|
47
|
+
}).done(function(data){
|
48
|
+
|
49
|
+
console.log(data);
|
50
|
+
|
51
|
+
}).fail(function(xhr,err){
|
52
|
+
|
53
|
+
console.log(err);
|
54
|
+
|
55
|
+
});
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
});
|
60
|
+
|
61
|
+
</script>
|
62
|
+
|
63
|
+
<form method="post">
|
64
|
+
|
65
|
+
<p>Database connection success!</p>
|
66
|
+
|
67
|
+
<table>
|
68
|
+
|
69
|
+
<tr>
|
70
|
+
|
71
|
+
<th>日</th>
|
72
|
+
|
73
|
+
<th>月</th>
|
74
|
+
|
75
|
+
<th>火</th>
|
76
|
+
|
77
|
+
<th>水</th>
|
78
|
+
|
79
|
+
<th>木</th>
|
80
|
+
|
81
|
+
<th>金</th>
|
82
|
+
|
83
|
+
<th>土</th>
|
84
|
+
|
85
|
+
</tr>
|
86
|
+
|
87
|
+
<tr class="js">
|
88
|
+
|
89
|
+
<td><input type="button" class="date_scheduled_open" value="1"></td>
|
90
|
+
|
91
|
+
<td><input type="button" class="date_scheduled_open" value="2"></td>
|
92
|
+
|
93
|
+
<td><input type="button" class="date_scheduled_open" value="3"></td>
|
94
|
+
|
95
|
+
<td><input type="button" class="date_scheduled_open" value="4"></td>
|
96
|
+
|
97
|
+
<td><input type="button" class="date_scheduled_open" value="5"></td>
|
98
|
+
|
99
|
+
<td><input type="button" class="date_scheduled_open" value="6"></td>
|
100
|
+
|
101
|
+
<td><input type="button" class="date_scheduled_open" value="7"></td>
|
102
|
+
|
103
|
+
</tr>
|
104
|
+
|
105
|
+
<tr class="js">
|
106
|
+
|
107
|
+
<td><input type="button" class="date_scheduled_open" value="8"></td>
|
108
|
+
|
109
|
+
<td><input type="button" class="date_scheduled_open" value="9"></td>
|
110
|
+
|
111
|
+
<td><input type="button" class="date_scheduled_open" value="10"></td>
|
112
|
+
|
113
|
+
<td><input type="button" class="date_scheduled_open" value="11"></td>
|
114
|
+
|
115
|
+
<td><input type="button" class="date_scheduled_open" value="12"></td>
|
116
|
+
|
117
|
+
<td><input type="button" class="date_scheduled_open" value="13"></td>
|
118
|
+
|
119
|
+
<td><input type="button" class="date_scheduled_open" value="14"></td>
|
120
|
+
|
121
|
+
</tr>
|
122
|
+
|
123
|
+
</table>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<div id="date_schesuled_show" name="date_schesuled_show" class="hidden">
|
128
|
+
|
129
|
+
<input type ="text" id="inputdate" name="inputdate" readonly value ="">
|
130
|
+
|
131
|
+
<div id="date_scheduled_close" class="date_scheduled_close">
|
132
|
+
|
133
|
+
閉じる
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
</form>
|
138
|
+
|
139
|
+
```
|