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

关于onlick事件和javascript的有关问题

WBOY
Release: 2016-06-13 12:03:26
Original
874 people have browsed it

关于onlick事件和javascript的问题
我自己写的js:

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


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


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

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


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

第二个: onlick   =>  onclick

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template