Home > Back-end >  How to use the webbrowser control execution script in web framework
How to use the webbrowser control execution script in web framework

Time:09-25

New problems encountered when using the webbrowser control is as follows:
Some of web framework, known framework 2 have a script "nextpage ()", the framework of 9 script "getid63 ()",
Now with the following code can perform framework 2 the script "nestpage ()" :
Web1. Oleobject. Document. The documentelement. Document. Frames. The item (2) execScript (' nextpage () ', 'JavaScript');
But the same code cannot perform framework 9 the script in "getid63 ()", to solve the reason, is there any way to execute a script framework?
Web1. Oleobject. Document. The documentelement. Document. Frames. The item (9). ExecScript (' getid63 () ', 'JavaScript');
This sentence is Invalid, the "Invalid variant operation", please answer,

CodePudding user response:

Isn't another problem of double quotes "quotes HOHO quotes"

Nextpage is () returns the integer
Getid63 () returns the string? If the string is big ye remember to use quotation marks

CodePudding user response:

Try
 
WebBrowser1. OleObject. Document. ParentWindow. ExecScript (nextpage () ', 'JavaScript');
WebBrowser1. OleObject. Document. ParentWindow. ExecScript (getid63 () ', 'JavaScript');

CodePudding user response:

 
WebBrowser1. OleObject. Document. ParentWindow. ExecScript (' nextpage () ', 'JavaScript');
WebBrowser1. OleObject. Document. ParentWindow. ExecScript (' getid63 () ', 'JavaScript');

CodePudding user response:

So many framework is drunk, determine the script has been loaded by that time
  • Related