我有这个:
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 ';'
但我不明白是什么问题,或者当我修改它时,鼠标悬停在代码上并不起作用。哪里出错?
答案 0 :(得分:1)
鼠标悬停和鼠标输出代码中的语法错误:
替换:
onmouseover="this.src=\'/img/language_selection/us.png"\'
以下代码:
onmouseover="this.src=\'/img/language_selection/us.png\'"
^^^
此处单一配额在双重配额之外。所以每次mouseover和mouseout事件都要改变它。