|
- Dim ie As Object
- Sub main()
- Set ie = CreateObject("internetExplorer.application")
- With ie
- .navigate "http://app.scientificseller.com/#/"
- .Visible = True
- End With
- serch [a2], [b2]
- End Sub
- Sub serch(reg, key)
- With ie
- .Refresh
- While ie.readystate <> 4
- DoEvents
- Wend
- End With
- loadScriptString ie, "$('textarea').val('" & key & "');$('#regionId').val('" & reg & "');start();"
- End Sub
- Sub loadScriptString(ie, code)
- Dim myScript, textcode
- On Error Resume Next
- Set myScript = ie.document.createElement("script")
- myScript.Type = "text/javascript"
- Err.Clear
- Set textcode = ie.document.createTextNode(code)
- myScript.appendChild (textcode)
- If Err Then Err.Clear: myScript.Text = code
- ie.document.body.appendChild (myScript)
- End Sub
复制代码 |
|