快速问题。我用自己漂亮的PNG取代了我网站上的按钮。然后将图像包装在提交按钮标记中。容易娇小的权利?为了清楚......Firefox图片按钮onmouseover事件不会触发
<button type='submit' style='border: 0; background: transparent;'>
<[img tag here] />
</button>
然后让他们感到互动,还有与图像onmouseover事件略有不同的照明效果的辅助按钮。一切工作与Chrome浏览器很好,但不是与Firefox。为了记录,我使用了一些在Firefox中工作的锚定标签,因此它是特定于提交按钮的。它看起来像firefox捕捉按钮节点中的onmouseover事件,并没有达到图像标签。建议?
注意 onmouseover被编码到html标签本身。我真的不想将代码移动到单独的监听器(太多的按钮,这让我感觉更清洁)。
感谢您的提前预订!
编辑 对不起 - 想我可能也已经包括了,只是柜面> _ <'
<button type='submit' style="border: 0; background: transparent;">
<img class='med_button' style='padding:0;margin:0 0 0 -8px;' src='<?php echo base_url().'assets/images/login_indent_green.png'; ?>' alt='login' onmouseover="src='<?php echo base_url().'assets/images/login_indent_green_hover.png'; ?>'" onmouseout="src='<?php echo base_url().'assets/images/login_indent_green.png'; ?>'" />
</button>
哪里是简单易懂的代码;)? – 2012-07-29 20:14:02
对不起。它现在在那里。 – dgeare 2012-07-29 20:27:56