本帖最后由 pcl_test 于 2018-6-9 16:00 编辑
VBS无form name,怎样改变值?
<html>
<head>
</head>
<body>
<form method="POST" action="/region">
<p>Use this page to select the region for this product.</p>
<select name="demo">
<option value="1">Test1</option>
<option value="2">Test2</option>
<option value="3">Test3</option>
<option value="4">Test4</option>
</select>
<p>Password:</p>
<input type="password" name="password" />
<p><input type="submit" value="Submit"></p>
</form>
</body>
</html>
如上
Dim ie
Dim Password
set ie=wscript.createobject("internetexplorer.application")
ie.visible=true
ie.navigate "test.htm"
Do
Wscript.Sleep 200
Loop Until ie.readyState = 4
ie.document.getElementsByName("Demo").value=3
ie.document.getElementsByName("password").value="1234567"
'ie.document.getElementById("LoginButton").click
fw.close
'ie.quit
上面蓝色两行无法成功,怎么解决啊??? |