質問編集履歴
5
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -174,13 +174,13 @@
|
|
174
174
|
|
175
175
|
以下のように したのですが
|
176
176
|
|
177
|
-
動作しません
|
177
|
+
動作しません (再度修正)
|
178
178
|
|
179
179
|
|
180
180
|
|
181
181
|
```vbs
|
182
182
|
|
183
|
-
|
183
|
+
|
184
184
|
|
185
185
|
scr = scr + " var createSelectBox = function (){ "
|
186
186
|
|
@@ -214,8 +214,6 @@
|
|
214
214
|
|
215
215
|
scr = scr + " }; "
|
216
216
|
|
217
|
-
scr = scr + " </script> "
|
218
|
-
|
219
217
|
|
220
218
|
|
221
219
|
' ユーザーIDとパスワードの入力ボックスと、ボタンを表示
|
4
再修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【Javascript】【vbs】実行されない?
|
1
|
+
再修正【Javascript】【vbs】実行されない?
|
test
CHANGED
File without changes
|
3
修正2
test
CHANGED
File without changes
|
test
CHANGED
@@ -167,3 +167,95 @@
|
|
167
167
|
end if
|
168
168
|
|
169
169
|
```
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
回答者の方のアドバイスにより
|
174
|
+
|
175
|
+
以下のように したのですが
|
176
|
+
|
177
|
+
動作しません
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
```vbs
|
182
|
+
|
183
|
+
scr = scr + " <script type='text/javascript'> "
|
184
|
+
|
185
|
+
scr = scr + " var createSelectBox = function (){ "
|
186
|
+
|
187
|
+
scr = scr + " var arr = [ "
|
188
|
+
|
189
|
+
scr = scr + " {val:'01', txt:'ポチ'}, "
|
190
|
+
|
191
|
+
scr = scr + " {val:'02', txt:'タマ'}, "
|
192
|
+
|
193
|
+
scr = scr + " {val:'03', txt:'モモ'} "
|
194
|
+
|
195
|
+
scr = scr + " ]; "
|
196
|
+
|
197
|
+
scr = scr + " for(var i=0;i<arr.length;i++){ "
|
198
|
+
|
199
|
+
scr = scr + " alert(arr[i].txt); "
|
200
|
+
|
201
|
+
scr = scr + " } "
|
202
|
+
|
203
|
+
scr = scr + " for(var i=0;i<arr.length;i++){ "
|
204
|
+
|
205
|
+
scr = scr + " op = document.createElement('option'); "
|
206
|
+
|
207
|
+
scr = scr + " op.value = arr[i].val; "
|
208
|
+
|
209
|
+
scr = scr + " op.innerText = arr[i].txt; "
|
210
|
+
|
211
|
+
scr = scr + " document.getElementById('sel1').appendChild(op); "
|
212
|
+
|
213
|
+
scr = scr + " } "
|
214
|
+
|
215
|
+
scr = scr + " }; "
|
216
|
+
|
217
|
+
scr = scr + " </script> "
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
' ユーザーIDとパスワードの入力ボックスと、ボタンを表示
|
222
|
+
|
223
|
+
html = ""
|
224
|
+
|
225
|
+
html = html + " <form> "
|
226
|
+
|
227
|
+
html = html + " <input type='hidden' name='CLICKED' value='false'/> "
|
228
|
+
|
229
|
+
html = html + " User ID: <input type='text' name='USERID'/> </br>"
|
230
|
+
|
231
|
+
html = html + " Password: <input type='password' name='PASSWD'/></br> "
|
232
|
+
|
233
|
+
html = html + " <select id='sel1'></select> "
|
234
|
+
|
235
|
+
html = html + " <input type='button' value= 'ボタン' onclick='createSelectBox();' /> "
|
236
|
+
|
237
|
+
html = html + " <input type='button' onClick = ""getElementsByName('CLICKED')(0).value = 'true';"" value='OK' /> "
|
238
|
+
|
239
|
+
html = html + " </form> "
|
240
|
+
|
241
|
+
wscript.echo scr
|
242
|
+
|
243
|
+
GuiIE.Document.Body.InnerHtml = html
|
244
|
+
|
245
|
+
script = GuiIE.Document.createElement("script")
|
246
|
+
|
247
|
+
script.innerHTML = scr
|
248
|
+
|
249
|
+
GuiIE.Document.Body.appendChild(script)
|
250
|
+
|
251
|
+
GuiIE.Document.Title = "VBScript GUI test."
|
252
|
+
|
253
|
+
wscript.echo html
|
254
|
+
|
255
|
+
' ボタンがクリックされるまで待つ
|
256
|
+
|
257
|
+
on error resume next
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
```
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,9 +6,9 @@
|
|
6
6
|
|
7
7
|
Javascriptが 機能していないみたいなのですが
|
8
8
|
|
9
|
-
htmlの内容を .htmlファイルにして IEに D&Dすると
|
9
|
+
htmlの内容を .htmlファイルにして IEに D&Dして "ボタン"を押下すると
|
10
10
|
|
11
|
-
動作
|
11
|
+
動作します (aleat表示、アイテム追加)
|
12
12
|
|
13
13
|
|
14
14
|
|
1
誤字修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【
|
1
|
+
【Javascript】【vbs】実行されない?
|
test
CHANGED
File without changes
|