質問編集履歴
1
javascript関数の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,31 @@
|
|
39
39
|
onClientClick="return sleep_time(parseInt('<%# sleep_time %>'));"
|
40
40
|
|
41
41
|
```
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
javascript 外部ファイル
|
48
|
+
|
49
|
+
```javascript
|
50
|
+
|
51
|
+
コード
|
52
|
+
|
53
|
+
function sleep_time(time){
|
54
|
+
|
55
|
+
var dt1 = new Date.getTime();
|
56
|
+
|
57
|
+
var dt2 = new Date.getTime();
|
58
|
+
|
59
|
+
while(dt2<dt1+time){
|
60
|
+
|
61
|
+
dt2 = new Date.getTime();
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
return;
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
```
|