document.write(""); $().ready(function() { $('#comment').val("我也来说两句!"); }); function reply_clearfield() { if ($('#comment').val() == "我也来说两句!") { $('#comment').val(""); } } function reply_restoration() { if($('#comment').val() == '') { $('#comment').val("我也来说两句!"); } } function ajaxload(commentid) { //var title = 靖州县工商局局虚假宣传案例; var data = "&commentid="+commentid+"&keyid=phpcms-content-title-7996&verify=197397472a61c6fc35a6707600e5f9ac" ; var url = "comment/?action=ajaxpost&urltext=show.php?contentid=7996"; //alert(url); $.ajax({ type: "POST", url: url, data: data, success: function(msg){ $('#repley_layer').html(msg); } }); } function voteFor(id) { this.id = id; var url = "comment/?action=vote"; var data = '&id='+id + '&field=support'; $.ajax({ url: url, data: data, type: 'post', success :function (msg){ $('#count_'+ id+'_1').text(msg); } }); } /** * 反对 **/ function voteAgainst (id ) { this.id = id; var url = "comment/?action=vote"; var data = '&id='+id + '&field=against'; $.ajax({ url: url, data: data, type: 'post', success :function (msg){ $('#count_'+ id +'_0').text(msg); } }); } function checkForm() { if($('#comment').val() == '' || $('#comment').val() == "我也来说两句!") { alert("内容不能为空"); $('#comment').focus(); return false; } if($('#checkcode').val() == '' ) { alert("验证码不能为空"); $('#checkcode').focus(); return false; } if ($('#comment').val().length > 1000) { alert("内容太长,最多 1000 个文字"); return false; } /*if( getcookie('phpcms-content-title-7996') ) { alert("请不要灌水"); return false; }*/ } function close() { $("#repley_layer").html(""); }