从锚点html标签调用javascript函数 [英] call javascript function from anchor html tag
问题描述
当用户单击链接时,我需要显示消息
I need to display message when the user clicks link
当用户单击Page1上的超级链接时,如何实现某些处理? 消息,然后在Page2准备好后就可以转发到Page2了吗?
How can I implement something where once the user click the hyper link on Page1, a "processing..." message and then as soon as Page2 is ready it forwards to Page2?
它正在处理按钮单击,我之前发布的按钮已成功实现了响应。谢谢。
It is working for button click which I earlier posted got response implemented successfully.Thanks.
我尝试为以下HTML实施相同的操作使用Servlet的代码不确定如何实现
Same thing I tried to implement for the below HTML code which is using Servlet not sure how to implement
<a href="<%=request.getContextPath()%>/servlet/VisibilityController?searchType=workSearchDetails&workNo=<%=installAtLocListBean.getWorkNumber()%>&ID=<%= firstLocationNumber %>&sitePosition=<%=pagePosition%>"><%=installAtLocListBean.getWorkNumber()%>onclick="MyFunction();return true;"</a></td>
任何机构都可以帮我吗,可以通过按钮单击任何示例吗?
谢谢预先
Can any body help me is it possible to do as button click any examples please Thanks in advance
推荐答案
您可以使用
<a href="javascript:someFunction()">LINK</a>
或
<a href="#" onclick="someFunction(); return false;">LINK</a>
,也可以检查此链接。
锚定标签onclick函数
or you can check this link. anchor tag onclick function
这篇关于从锚点html标签调用javascript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!