是否可以在 global.asax 文件中编写 Jquery 或 Javascript
大家好,我有一个要求,即我的表单上有图像图标,当我将鼠标悬停在该图标上时,必须显示工具提示。假设我在一个表单上有如下控件,
Bank Name Textbox Helpicon(when i mouse over on this i would like to display the tooltip from global.asax file)
就像我有另一个具有相同控件的表单一样,当我将鼠标悬停在图像图标上时,我想显示相同的帮助文件作为帮助文件的工具提示。
我已经使用 Jquery
完成了此操作,但我的经理要求显示 global.asax
文件中的帮助文本。那么当我使用鼠标时是否可以显示帮助文本覆盖 global.asax
文件中的图标。谁能提供一下示例代码..
Hi all i am having a requirement i.e i will have image icons on my form where i have to show tool tips when i hover the mouse on that icon. Assume that i have my controls as follows on a form
Bank Name Textbox Helpicon(when i mouse over on this i would like to display the tooltip from global.asax file)
Like that i have another form with same controls there also when i mouse over on the image icon i would like to display the same help file as tooltip for the help file.
I have done this with Jquery
but my manager is asking to show the help text from the global.asax
file.. so is it possible to show the help text when i mouse over the icon from global.asax
file. Can any one provide sample code..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
global.asax 不适合这个,因为它是纯服务器端代码。
我假设您可以使用一个母版页,该母版页将始终包含您为显示工具提示所做的脚本。
您只需要用类标记帮助图标,并可能显示 alt 属性中写入的值(这是有意义的,因为当 javascript 被禁用/不可用时,人们仍然可以查看帮助文本)
global.asax is not meat for this as it is pure server side code.
I assume you can use a master page that will always include the script you have done to display the tooltip.
You can just need to mark the help icon with a class and perhaps display the value that is written in the alt property (it makes sense since when javascript is disabled/not available people will still be able to view the help text)
使用母版页并将 jquery 和其他 javascript 放在那里。
Use a master page and put your jquery and other javascript there.