[英]Pass Multiple arguments onMouseover event handler in HTML
I would like to know how to pass multiple arguments to the the function with onmouseover event handler in HTML. 我想知道如何使用HTML中的onmouseover事件处理程序将多个参数传递给该函数。
Here is the following code in PHP , 以下是PHP中的以下代码,
<a href='Page2.php?user=" . $userid . "' target='_blank' onMouseOver=\"writetxt('" . $info "')\" onMouseOut=\"writetxt(0)\">"
I would like to pass 2 arguments to writetxt()
function something like this : 我想将2个参数传递给writetxt()
函数,如下所示:
writetxt($arg1, $arg2)
<a href='Page2.php?user=" . $userid . "' target='_blank' onMouseOver=\"writetxt('" . $info . "," . $img . "')\" onMouseOut=\"writetxt(0)\">"
Thanks 谢谢
It should be like... 它应该像......
writetxt('" . $info . "', '" . $img . "');
^ ^
像这样用
echo "<a href=\"Page2.php?user=" . $userid ."\" target=\"_blank\" onMouseOver=\"writetxt('" . $info . "','" . $img . "')\" onMouseOut=\"writetxt(0)\">" ;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.