什么是href =" javascript:void(0);"什么时候使用它? [英] What is href="javascript:void(0);" and when to use it?

查看:89
本文介绍了什么是href =" javascript:void(0);"什么时候使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

onclick =changelanguage(@ chlang.LanguageId)href =javascript:void(0);

谢谢!!

onclick="changelanguage(@chlang.LanguageId)" href="javascript:void(0);"
thank you!!

推荐答案

您应该更频繁地使用互联网搜索...

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void [ ^ ]
You should use internet search more frequently...
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void[^]


它停止浏览器在某处导航当用户点击链接时,唯一发生的是你的onclick代码被执行。
It stops the browser navigating somewhere when the user clicks the link, so the only thing that happens is your "onclick" code is executed.


这篇关于什么是href =" javascript:void(0);"什么时候使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆