-5

我有这个 :

     echo '


     <div id="headlineatas">
     <br>
     <div id="adsground">
     <br><br><br>
     <p align="center"><span style="font-size: 44px;"> Language Selection </span></p>
<table height="400" width="1024">
        <tr>
        <td>


        <center><a href="index.php?lang=en" id="language1">
    <img title="English" src="/img/language_selection/us_first.png" onmouseover="this.src=\'/img/language_selection/us.png"\' onmouseout="this.src=\'/img/language_selection/us_first.png"\' />
</a>

            </center>

        </td>
        <td>

        <center><a href="index.php?lang=ro" id="language2">
    <img title="Romanian" src="/img/language_selection/ro_first.png" onmouseover="this.src=\'/img/language_selection/ro.png"\' onmouseout="this.src=\'/img/language_selection/ro_first.png"\' />
</a>


        </center>

        </td>
        </tr>
        </table>



</div></div></center>

我有这样的错误:syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'在但我不明白问题是什么,或者当我修改它时,鼠标悬停代码不起作用。我哪里错了?

4

1 回答 1

1

您在 mouseover 和 mouseout 代码中有错误的语法:

代替 :

onmouseover="this.src=\'/img/language_selection/us.png"\'

使用以下代码:

onmouseover="this.src=\'/img/language_selection/us.png\'"
                                                      ^^^

这里单配额在双配额之外。所以每次 mouseover 和 mouseout 事件都要改变它。

于 2013-06-20T11:46:24.233 回答