Php 调用函数的Image onclick事件不适用于FF和Chrome
大家好 我有一个div部分,其中有一个图像,其onlick事件应该执行其中调用的函数,但它不能在FF或chrome中用我的代码执行,事实上,该图像根本不可单击。谁能帮我把这件事做完吗?下面是我正在使用的代码Php 调用函数的Image onclick事件不适用于FF和Chrome,php,javascript,html,javascript-events,Php,Javascript,Html,Javascript Events,大家好 我有一个div部分,其中有一个图像,其onlick事件应该执行其中调用的函数,但它不能在FF或chrome中用我的代码执行,事实上,该图像根本不可单击。谁能帮我把这件事做完吗?下面是我正在使用的代码 <div class="addtocart-popup-bg"> <div class="addtocart-popup-link"> <ul> <li class="col1"
<div class="addtocart-popup-bg">
<div class="addtocart-popup-link">
<ul>
<li class="col1"><img src="images/categorypage/folder-icon.gif" width="62" height="50" border="0" /></li>
<li class="col2">
Submit Print Ready File
<p>Upload your ready to print file/artwork.</p>
</li>
<li class="col3"><img src="images/categorypage/start-order-now-btn.gif" width="134" height="29" border="0" title="Start Order Now" alt="Start Order Now" style="cursor:pointer" onclick="<?php echo "javascript:gotoCat('1');" ?>"/></li>
</ul>
</div>
</div>
-
提交打印就绪文件
上传准备打印的文件/艺术品
- “/>
您写道图像是不可点击的。您的意思是,指定的光标没有出现吗
在这种情况下,我认为这是CSS的问题,图像前面似乎隐藏了一些东西。你也可以使用firebug来找出它是什么。我在Firefox 3.6.10/Ubuntu9.10上测试了你的代码
<html>
<head>
<title>Test onClick()</title>
<script type="text/javascript">
function gotoCat(n) { alert("gotoCat(" + n + ")"); }
</script>
<body>
testonclick()
函数gotocate(n){alert(“gotocate”(+n+));}
并添加
它按预期工作。不回答,但将帮助您生成FF呈现的HTML。请检查页面上是否存在JavaScript函数gotocate()。是的,它的作用与IE上可执行的代码相同