Home >Backend Development >PHP Tutorial >关于onlick事件和javascript的问题

关于onlick事件和javascript的问题

WBOY
WBOYOriginal
2016-06-23 13:52:55855browse

我自己写的js:

<script>function openweb(lid,td){window.location="list.php?lid="+lid+"&td="+td;return true;}function openmenu(td){	window.location="menu_list.php?td="+td;return;}</script>


PHP代码:
<a href="javascript:openweb(38,5)">111</a>


为什么只能在谷歌 浏览器打开,ie和火狐都打不开

如果用onlick没效果:
<a href="#“ onlick=”openweb(38,5)">111</a>


回复讨论(解决方案)

第一个在火狐测试通过,不知道你为什么不行,控制台下看看报什么错误。

第二个: onlick   =>  onclick

onclick

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn