【发布时间】:2014-11-26 01:20:52
【问题描述】:
-
getUserName.php
if($num) { echo '<img src="images/no.png" width="16" height="16" align="bottom" />'; echo '<div style="color:red">Username was taken. Please type another new one.</div>'; } else { echo '<img src="images/yes.png" width="16" height="16" align="bottom" />'; } 假设我想将消息更改为图像。
-> “用户名已被占用”更改为 no.png
-> “你可以使用它...”更改为 yes.png-
test1.php
$('#addform').submit(function () { return $("#userNameCheck").html() == '<div><img src="images/yes.png" width="16" height="16" align="bottom"></div>'; }); 在第 1 部分中,我使用“您可以使用它”消息转到 test2.php;但是现在,我想使用图像(yes.png)而不是消息。然而,它失败了。我应该如何修改?
【问题讨论】: