Onmouseover不适用于php [英] Onmouseover not working with php

查看:86
本文介绍了Onmouseover不适用于php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我试图在php中做一个mouseover事件,但无法做到这一点.
这样的代码可以正常工作..

Hi all,
i am try to do a mouseover event in php but unable to this.
This the code working fine..

<div id="main-icon">
<div class="main-icon-left">
 <a href="../index.php"><img src="pb-images/icon-right.png" width="49" height="47" border="0" name="icon right"  alt="icon right" title="icon right" onMouseOver="this.src = 'pb-images/icon-right-hr.png';"  önMouseOut="this.src = 'pb-images/icon-right.png';"></a>
</div>
<div class="main-icon-right"> <a href="machines/binding.php"><img src="pb-images/icon-left.png" width="49" height="47" border="0" name="icon right"  alt="icon right" title="icon right" onMouseOver="this.src = 'pb-images/icon-left-hr.png';"  önMouseOut="this.src = 'pb-images/icon-left.png';"></a></div>
</div>



但是在php
中使用此代码



But using this code in php

<div id='main-icon'>
<div class='main-icon-left'>
 <a href='../index.php'><img src='pb-images/icon-right.png' width='49' height='47' border='0' name='icon right'  alt='icon right' title='icon right' onMouseOver='this.src = 'pb-images/icon-right-hr.png';'  önMouseOut='this.src = 'pb-images/icon-right.png';'></a>
</div>
<div class='main-icon-right'> <a href='machines/binding.php'><img src='pb-images/icon-left.png' width='49' height='47' border='0' name='icon right'  alt='icon right' title='icon right' onMouseOver='this.src = 'pb-images/icon-left-hr.png';'  önMouseOut='this.src = 'pb-images/icon-left.png';'></a></div>
</div>";


在这种情况下,onmouseOver和onmouseOut无法正常工作. 如果有人对此有任何想法,请尽快告诉我

Thanks


In this the onmouseOver and onmouseOut not working..
If anybody have any idea related to this then please Let me know ASAP

thanks

推荐答案

检查您的冒号是否为鼠标移出事件处理程序声明中的分号.您甚至可以在CP上看到它是哪里错了:)
Check your colon an semicolon in mouse out event handler declaration. You can even see it here on CPwhat is wrong :)


大家好,
我发现ans只是用此更改代码
Hi all,
i found the ans just change the code with this
<img src="../../pb-images/icon-left.png" width="49" height="47" border="0" name="icon right" alt="icon right" title="icon right" onmouseover="\"this.src" this.src="../../pb-images/icon-left.png" hold=" /><br mode="></img>


这篇关于Onmouseover不适用于php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆