This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center




已关闭8年。




我试图在php echo语句中使用javascript函数。正在使用showme和onclick函数,并且必须在showme函数中传递值。

下面的代码不起作用。
 echo"
  <ul>
  <li><a href='javascript:void(0);' onclick='showme('Test','','10.70725','-61.55391','','Tester');' >$id</a></li>
</ul>
  ";

我该如何解决?

最佳答案

echo"
  <ul>
  <li><a href='javascript:void(0);' onclick=\"showme('Test','','10.70725','-61.55391','','Tester');\" >$id</a></li>
</ul>
  ";

09-25 17:38