来自VB.net控件的javascript事件问题 [英] Problems with javascript event lauch from VB.net control
问题描述
我想在单击表单中的按钮时将光标显示为沙漏,并使用以下行来实现该目的
>
Me.btnRecherche.Attributes.Add(" onclick"," document.body.style.cursor =''wait'';")
可悲的是,它不起作用。一件奇怪的事情是,当我写下以下内容时:
Me.btnRecherche.Attributes.Add(" onclick"," document.body.style.cursor =''wait' ';警告(""'ASASSAS"");")
我收到警报,但光标没有变化。
行document.body.style.cursor =''wait''是否有问题; ?
谢谢,
P
Hi,
I want to display the cursor as an hourglass on the click of a button in the form and use the following line to achieve that
Me.btnRecherche.Attributes.Add("onclick", "document.body.style.cursor = ''wait''; ")
Sadly, it doesn''t work. One strange thing is that when I write the following:
Me.btnRecherche.Attributes.Add("onclick", "document.body.style.cursor = ''wait''; alert(""ASASSAS"");")
I do get the alert, but the cursor doesn''t change.
Is there something wrong with the line document.body.style.cursor = ''wait''; ?
Thanks,
P
推荐答案
我希望在单击表单中的按钮时将光标显示为沙漏,并使用以下行来实现
Me.btnRecherche.Attributes.Add(" onclick"," document.body.style.cursor =''wait'';")
可悲的是,它不起作用。一件奇怪的事情是,当我写下以下内容时:
Me.btnRecherche.Attributes.Add(" onclick"," document.body.style.cursor =''wait' ';警告(""'ASASSAS"");")
我收到警报,但光标没有变化。
行document.body.style.cursor =''wait''是否有问题; ?
谢谢,
P
Hi,
I want to display the cursor as an hourglass on the click of a button in the form and use the following line to achieve that
Me.btnRecherche.Attributes.Add("onclick", "document.body.style.cursor = ''wait''; ")
Sadly, it doesn''t work. One strange thing is that when I write the following:
Me.btnRecherche.Attributes.Add("onclick", "document.body.style.cursor = ''wait''; alert(""ASASSAS"");")
I do get the alert, but the cursor doesn''t change.
Is there something wrong with the line document.body.style.cursor = ''wait''; ?
Thanks,
P
嗯有趣......
尝试:
Me.btnRecherche.Attributes.Add(" OnClick"," javascript :document .body.style.cursor =''wait'';")
这在我在IE中测试时有效。
Hmm interesting...
Try:
Me.btnRecherche.Attributes.Add("OnClick", "javascript:document.body.style.cursor = ''wait''; ")
This worked when I tested it in IE.
谢谢,但同样的结果。
如果它可以帮到你帮助我:
我正在使用VS2005
这是一个WEB asp .net应用程序/表格
我在VS2003中使用了与同类项目相同的行,它运行得很好:S
谢谢,
P
Thanks, but same result.
If it can help you help me:
I''m using VS2005
It is a WEB asp .net application/form
I used the same line in VS2003 with a similar project and it worked just fine :S
Thanks,
P
谢谢,但结果相同。
如果它可以帮到你帮助我:
我正在使用VS2005
它是一个WEB asp .net应用程序/ form
我在VS2003中使用了与同类项目相同的线路并且工作得很好:S
>
谢谢,
P
Thanks, but same result.
If it can help you help me:
I''m using VS2005
It is a WEB asp .net application/form
I used the same line in VS2003 with a similar project and it worked just fine :S
Thanks,
P
我也使用VS2005。
这不是服务器端问题,与VS没有任何关系。这是客户端问题。
这可能意味着你关闭了JavaScript ......或者可能意味着你的浏览器不支持这个.... />
也许你的页面在你真正好好看看光标之前回复了吗?
I was using VS2005 as well.
This is not a Server Side problem and doesn''t really have anything to do with VS. It''s a Client Side problem.
This could mean that you have JavaScript turned off...or could mean that your browser doesn''t support this....
Maybe your page posts back before you really get a good look at the cursor?
这篇关于来自VB.net控件的javascript事件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!