[英]What is meant by onclick = “javascript: javascript: function(value);”?
I know this - onclick = "javascript: function(value);"
我知道onclick = "javascript: function(value);"
. 。 what is the purpose of writing javascript twice as in 写两次javascript的目的是什么
onclick = "javascript: javascript: function(value);" ?
please help. 请帮忙。
There is no good reason to include the "javascript" protocol. 没有充分的理由包括“ javascript”协议。 It is most likely an error. 这很可能是错误。
I would also mention that you should consider attaching click events using DOM APIs. 我还要提到,您应该考虑使用DOM API附加点击事件。 For example: 例如:
document.getElementById('el').addEventListener('click', function(value) {...});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.