因为点击链接时还需要传递隐形参数,所以调用javascript来处理
//a.php:
.....
echo " <a href='' onclick=\"nextPage('$name','$mask')\">$name </a>";
//javascript:function nextPage(cName,maskAddr)
{
document.open();
document.write(" <form action='b.php?name="+cName+"' name='form1' method='post'>");
document.write(" <input type='hidden' name='mAddr' value='"+maskAddr+"'>");
document.write(" </form>");
document.form1.submit();
document.close();
}这段代码在ie下是可以运行的,但是在mozilla 的seamonkey下没有任何反应。请问哪里有错吗?mozilla是在系统linux下运行的。是这个浏览器不认吗?我之前用document.其它参数都挺好用的阿。
//a.php:
.....
echo " <a href='' onclick=\"nextPage('$name','$mask')\">$name </a>";
//javascript:function nextPage(cName,maskAddr)
{
document.open();
document.write(" <form action='b.php?name="+cName+"' name='form1' method='post'>");
document.write(" <input type='hidden' name='mAddr' value='"+maskAddr+"'>");
document.write(" </form>");
document.form1.submit();
document.close();
}这段代码在ie下是可以运行的,但是在mozilla 的seamonkey下没有任何反应。请问哪里有错吗?mozilla是在系统linux下运行的。是这个浏览器不认吗?我之前用document.其它参数都挺好用的阿。
这样就ok了。 也是别人教我的。又学到一招