-
Apr 29th, 2021, 02:52 AM
#1
Thread Starter
PowerPoster
run js on Webbrowser1 by vb6,webBrowser1.Document.InvokeScript
webBrowser1.Document.InvokeScript?
can it run?
dim a
a=webBrowser1.Document.InvokeScript("test",123)
how to return js value from webbrowser
can use this:
Code:
WebBrowser1.Silent = True
WebBrowser1.Navigate "www.baidu.com"
End Sub
Private Sub Command1_Click()
WebBrowser1.Document.parentWindow.execScript ("alert('3')")
End Sub
Private Sub Command2_Click()
Dim S As String
S = WebBrowser1.Document.Script.Eval("document.title")
MsgBox "Title=" & S
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
WebBrowser1.Silent = True
End Sub
Last edited by xiaoyao; May 2nd, 2021 at 07:50 AM.
Reason: upload vb code successfull,please move to "code bank"
-
Apr 29th, 2021, 03:01 AM
#2
Re: run js on Webbrowser1 by vb6,webBrowser1.Document.InvokeScript
Try
Dim a As Object
Set a = ...
Edit: CodeBank section is for sample code not for questions. You've been posting questions (and other non-sense) to CodeBank section since couple of months. Are you ok with your head? Which part of "Don't post questions in CodeBank" you don't understand?
cheers,
</wqw>
-
May 2nd, 2021, 07:26 AM
#3
Thread Starter
PowerPoster
Re: run js on Webbrowser1 by vb6,webBrowser1.Document.InvokeScript
Originally Posted by wqweto
Try
Dim a As Object
Set a = ...
Edit: CodeBank section is for sample code not for questions. You've been posting questions (and other non-sense) to CodeBank section since couple of months. Are you ok with your head? Which part of "Don't post questions in CodeBank" you don't understand?
cheers,
</wqw>
I'm busy these days, and I haven't sorted out the code yet.
In fact, sometimes I am trying to ask, to see if anyone else understands this problem.Actually, I already know the answer.
Perhaps the best way is to publish it to the question board first, then answer it, and then transfer it to the code base.
Some people may have no idea what I'm doing.But for those of you who know,Two days ago I wrote two very complex string pointer uses, but I have not yet heard from anyone about his test, Some people are skeptical about him, or interested in him, anyway, I have made so much effort, should I go to test it?
Even if he is a cow knife, it's just a waste of killing chickens, but it's a solution anyway.
In some special scenarios, its efficiency is very high.
In fact, I just aim at some key words.
Certain techniques can improve the speed of the function. I'm interested.
Maybe it doesn't have to be that serious. As long as it works, why does it have to run so fast?
Sometimes I think a string segmentation method is better, but it does not mean that it is the best in the world.
Some people will refute your method is much slower than others. If it is true that it is really very good, because I have never said that my method is the fastest. And some methods are not written by I.
On the contrary, I spent a lot of energy and dozens of hours Write Vb code, but they did not test them.
In fact, we were just interested in communicating.Whose method is better, that is a better thing.But don't attack your method casually, it's slow or something.
Because I just choose some fast algorithms as much as possible, that's all.If some of the methods aren't fast enough, I'll write some faster tests.
The fastest Running Function not necessarily better, and it may use a lot of this code.Sometimes we use a faster way instead, and there is no need to use the fastest way.
Just like buying cell phone, it is no problem to buy products two or three years ago, and it is not necessary to replace the latest cell phone every year.
I spent a lot of time on that string pointer, and it was a headache.
There is a week's holiday of Labor Day in China now, and I have no time to rest.
Last edited by xiaoyao; May 2nd, 2021 at 07:53 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|