内的任何想法,我怎么能在边写这样的代码PHP脚本:写javascript PHP代码
<a href = "javascript:void(0)" onclick = "document.getElementById('lightpos<?=$the_job_id;?>').style.display='block';document.getElementById('fadepos<?=$the_job_id;?>').style.display='block'"><img src='img/remove.png' onmouseover=this.src='img/remove_light.png' onmouseout=this.src='img/remove.png'></a>
我都试过了,这一点,但不工作:
<?php
echo" <a href = 'javascript:void(0)' onclick = 'document.getElementById('lightpos<?=$the_job_id;?>').style.display='block';document.getElementById('fadepos<?=$the_job_id;?>').style.display='block' '><img src='img/remove.png' onmouseover=this.src='img/remove_light.png' onmouseout=this.src='img/remove.png'></a> ";
?>
什么想法?
第一个将只是正常工作。如果第二个不起作用,由于引号问题,最可能发生这种情况。你可能不得不逃脱它们。你拥有的嵌套字符串越多,就越容易获得,这就是为什么你应该避免这样的事情。 –
是的,我知道......这是我不知道如何修复它 – user2491321
如果你看看上面的颜色编码,它会给你一些提示? – adeneo