[英]who can give me explain it about javascript?
javascript:delete_reply_notify('14557174');void(0) javascript:delete_reply_notify('14557174');无效(0)
it make javascript delete one row which id = 1455174 它使javascript删除ID = 1455174的一行
but ,why is void(0)? 但是,为什么void(0)? what's mean ? 什么意思 ?
Its to prevent the default behaviour of the link from being activated, namely redirecting the browser to a new page. 它可以防止激活链接的默认行为,即将浏览器重定向到新页面。 Your example though shows poor JavaScript practice - you should look into coding things unobtrusively and into the use of progressive enhancement 你的榜样,虽然显示较差的JavaScript做法-你应该考虑的事情编码悄悄地进入使用渐进增强
To prevent the page reloading upon a single click, we can use JavaScript:void(0);
为了防止单击一次重新加载页面,我们可以使用JavaScript:void(0);
within the anchor link. 在锚链接中。
stops the link activating. 停止激活链接。 Best to avoid the javascript protocol if possible better to use the click event. 如果可能,最好避免使用javascript协议,最好使用click事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.