20,359
社区成员
发帖
与我相关
我的任务
分享
$(function () {
if ($("#comment-box").length > 0) {
alert(infoid);
$.ajax({
type : "post",
cache : false,
url : webroot + "http://www..com/comment.php?act=islogin",
data : "gourl=" + contenturl,
success : function (_) {
$("#comment-box").html(_);
checkcomment()
}
})
}
if ($("#comments").length > 0) {
$.ajax({
type : "post",
cache : false,
url : webroot + "http://www..com/comment.php?act=load&id=" + infoid,
success : function (_) {
$("#comments").html(_)
}
})
}
});
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.js"></script>
<script type="text/javascript">
$(function () {
$.ajax({
type : "post",
cache : false,
url : "http://a.com/test.php?act=islogin",
data : "gourl=" + contenturl,
success : function (_) {
$("#comment-box").html(_);
checkcomment()
}
})
});
</script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.js"></script>
<script type="text/javascript">
$(function () {
// if ($("#comment-box").length > 0) {
$.ajax({
type : "post",
cache : false,
url : "http://a.com/test.php?act=islogin",
data : "gourl=" + contenturl,
success : function (_) {
$("#comment-box").html(_);
checkcomment()
}
})
//}
// if ($("#comments").length > 0) {
/* $.ajax({
type : "post",
cache : false,
url : "http://a.com/comment.php?act=load&id=" + infoid,
success : function (_) {
$("#comments").html(_)
}
})*/
//}
});
</script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.js"></script>
<script type="text/javascript">
$(function () {
// if ($("#comment-box").length > 0) {
$.ajax({
type : "post",
cache : false,
url : webroot + "http://a.com/test.php?act=islogin",
data : "gourl=" + contenturl,
success : function (_) {
$("#comment-box").html(_);
checkcomment()
}
})
//}
// if ($("#comments").length > 0) {
/* $.ajax({
type : "post",
cache : false,
url : webroot + "http://www..com/comment.php?act=load&id=" + infoid,
success : function (_) {
$("#comments").html(_)
}
})*/
//}
});
</script>
是不是还要封装这个方法呀,好像也不是呀,
这是扒拉别个网站的,他里面好像就没有封装啥方法呀