JS传递参数 var kk = 某个变量;var str = "<a class='mini-button' href='javascript:look_com(kk);' style='width: 70px; margin-left: 20px'>查看</a>";我这个里面的KK 怎么写啊 一直无法传递 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> <head> <script type="text/javascript"> window.onload=function() { var kk = 'hello world'; var str = "<a class='mini-button' href='javascript:look_com(\""+kk+"\");void(0);' style='width: 70px; margin-left: 20px'>查看</a>" document.getElementById('msg').innerHTML=str; } function look_com(para) { alert(para); } </script> </head> <body> <div id="msg"> </div> </body></html> <script> var kk="132456" alert("<a class='mini-button' href='javascript:look_com("+kk+");' style='width: 70px; margin-left: 20px'>查看</a>"); </script> jquery+ajax 关于日期时间js在FF和IE9下显示错误的问题,公历,农历... 网页连接带RS232接口的电子秤,RMB求解 请各位帮忙解决Fckeditor和Webeq整合的问题 模式窗口返回的值,Asp.Net当前页面的后台可以调用吗 javascript中回调的问题 关于过滤字符串的问题 用javascript实现"记住我的帐号"的功能 打印的问题 关于jQuery大家怎么看? 急求 一个jquery 日历插件 js实现股票查询
<html>
<head>
<script type="text/javascript">
window.onload=function()
{
var kk = 'hello world';
var str = "<a class='mini-button' href='javascript:look_com(\""+kk+"\");void(0);' style='width: 70px; margin-left: 20px'>查看</a>"
document.getElementById('msg').innerHTML=str;
}
function look_com(para)
{
alert(para);
}
</script>
</head>
<body>
<div id="msg">
</div>
</body>
</html>
<script>
var kk="132456"
alert("<a class='mini-button' href='javascript:look_com("+kk+");' style='width: 70px; margin-left: 20px'>查看</a>");
</script>