-2
我想製作註釋並將其分享給其他人的代碼。
當我運行這段代碼並寫下評論時,它不會打印任何內容。
注意:我從youtube上的教程中獲得了這段代碼。使用jquery和php的牆帖子
<html>
<head>
<title>hesham</title>
</head>
<script src="jquery-1.6.1.min.js" type="text/javascript"></script>
<script type="text/javascrpt">
function get()
{
var input = $('#cmt').val();
$('#an').prepend(input);
};
</script>
<body>
<form name="frm">
<input type="text" name="cmt" id="cmt" /><input type="button" value="post" onclick="get()" />
</form>
<div id="an" style="width:300px">
</div>
</body>
</html>
你的腳本應該是''
(您關閉了''首先,你應該檢查你的'' jQuery的聲明的位置 – Sablefoste內 - 刪除原帖+1 @ SableFoste,我讀。 – 13ruce1337
請正確提出問題,我們知道它沒有打印任何內容,並且想要幫助您 - 我們不需要4個感嘆號,然後按一下「plz」即可這樣做。 – ScottMcGready