首页 新闻 赞助 找找看

Uncaught ReferenceError: $ is not defined

0
悬赏园豆:5 [已解决问题] 解决于 2014-11-21 10:07

Uncaught ReferenceError: $ is not defined怎么解决

 

 

 

$(function () {
//function Submite() {
// document.getElementById("Comments").style.display = "none";
// //var content = document.getElementById("mmmmmm").value;
//$.post("ProductDetail.aspx", {op:'insert', Content:content});
$("#tbbtn").click(function () {
document.getElementById("Comments").style.display = "none";
var vcontent = $("#mmmmmm").val();
$.getJSON("Comment.ashx", { op: 'insert', content: vcontent }, function (data) {
if (data != null) {
window.location.href = "ProductDetail.aspx";
}
});
//}
});
});

在赶往死亡的路上的主页 在赶往死亡的路上 | 初学一级 | 园豆:198
提问于:2014-11-19 14:43
< >
分享
最佳答案
0

$你引用jquery的js了吗?如果没有引用需要引用和注册的。网上一大片,自己找一下!

收获园豆:5
Mr.Brian | 小虾三级 |园豆:1518 | 2014-11-19 17:13

怎么引用

在赶往死亡的路上 | 园豆:198 (初学一级) | 2014-11-20 13:55

@菜鸟需帮助: 我告诉你一下,但是以后希望你自己要学会自己解决和查阅资料。

<html> 
    <head> 
    /*src就代表了你要引用jquery的脚本,比如你是本地的就引用本地文件下载下来,如果你是网上的可以把这个网址全名放在这边也是可以的啊*/
    <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> 
        $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); });
</script>
     </head> 
<body>
 <p>If you click on me, I will disappear.</p> </body> </html>    
Mr.Brian | 园豆:1518 (小虾三级) | 2014-11-21 10:04

@Mr.Brian: 3Q

在赶往死亡的路上 | 园豆:198 (初学一级) | 2014-11-21 10:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册