javascript:
<script>
$('#submit').click(function () {
$("p").show("slow");
});
</script>
尝试二:
<script>
$("input[type='submit']").click(function () {
$("p").show("slow");
});
</script>
html:
<form>
username:<br>
<input type="text" name="un"><br>
password:<br>
<input type="password" name="pw"><br>
<input type="checkbox" name="pw">
remember me<br>
<p><a href="recover.php">recover password</a></p>
<p><input type="submit" value="Submit" id="submit"></p>
<p style="display: none; color:cc0000">Authentication failed.</p>
<p><button onclick="window.top.hidePopWin()">Close</button></p>
</form>
我在这里的选择器上弄乱了我的语法吗?提交按钮似乎没有使用任何一种方法显示隐藏的消息..