function name_area(ccc){ if(ccc.checked){ document.getElementById("name_area").style.display='none'; writeCookie('nameshow',1,720) }else{ document.getElementById("name_area").style.display=''; writeCookie('nameshow',0,720) } } function readCookie(name){ var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0){ offset = document.cookie.indexOf(search); if (offset != -1){ offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)) } } return cookieValue; } function writeCookie(name, value, hours){ var expire = ""; var domain = "; path=/; domain=.hangzhou.com.cn"; if(hours != null){ expire = new Date((new Date()).getTime() + hours * 3600000); expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + escape(value) + expire + domain; } function comcheck(frm){ if(frm.content.value==''){ alert("请输入评论类容!"); frm.content.focus(); return false; } if(frm.niming.checked===false && frm.name.value==''){ alert("请输入昵称,或者勾选匿名发表!"); frm.name.focus(); return false; }else{ writeCookie('namecom',frm.name.value,720); } return true; } function byteLength (sStr) { aMatch = sStr.match(/[^\x00-\x80]/g); return (sStr.length + (! aMatch ? 0 : aMatch.length)); } function getStrbylen(str, len) { var num = 0; var strlen = 0; var newstr = ""; var laststrlen = 1; var obj_value_arr = str.split(""); for(var i = 0; i < obj_value_arr.length; i ++) { if(i < len && num + byteLength(obj_value_arr[i]) <= len) { num += byteLength(obj_value_arr[i]); strlen = i + 1; } } if(str.length > strlen) { if(byteLength(str.charAt(strlen-1)) == 1){ laststrlen = 2; } newstr = str.substr(0, strlen-laststrlen) + '…'; } else { newstr = str; } return newstr; } function textCounter(obj, maxlimit) { var len = strLen(obj.value); if(len > maxlimit) { obj.value = getStrbylen(obj.value, maxlimit); alert("最多"+maxlimit+"个字节"); } } function strLen(str) { var charset = document.charset; var len = 0; for(var i = 0; i < str.length; i++) { len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == "utf-8" ? 3 : 2) : 1; } return len; } document.write(''); document.write(''); document.write('
'); document.write('
网友提问选登
'); document.write('杭州网网友 2024-10-29 09:24:21
'); document.write('杭州网网友 2024-10-29 09:23:40
'); document.write('杭州网网友 2024-10-29 09:22:43
'); document.write('杭州网网友 2024-10-29 09:21:53
'); document.write('杭州网网友 2024-10-29 09:16:50
'); document.write('杭州网网友 2024-10-29 09:16:21
'); document.write('杭州网网友 2024-10-29 09:15:11
'); document.write('杭州网网友 2024-10-29 09:14:47
'); document.write('杭州网网友 2024-10-29 09:14:05
'); document.write('杭州网网友 2024-10-29 09:13:48
'); document.write(''); document.write('
'); document.write(''); document.write('
'); document.write(''); document.write('