文字广告位招租中 文字广告位招租中
有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br><!-- http://www.pccode.net/js --><!-- bbs http://www.pccode.net/bbs--><!-- 完整的HTML代码 --><html><head><style type="text/css">.progress{width: 1px;height: 14px;color: white;font-size: 12px; overflow: hidden;background-color: navy;padding-left: 5px;}</style><script type="text/JavaScript">function textCounter(field,counter,maxlimit,linecounter) {// text width//var fieldWidth = parseInt(field.offsetWidth);var charcnt = field.value.length; // trim the extra textif (charcnt > maxlimit) { field.value = field.value.substring(0, maxlimit);}else { // progress bar percentagevar percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ;document.getElementById(counter).style.width = parseInt((fieldWidth*percentage)/100)+"px";document.getElementById(counter).innerHTML="Limit: "+percentage+"%"// color correction on style from CCFFF -> CC0000setcolor(document.getElementById(counter),percentage,"background-color");}}function setcolor(obj,percentage,prop){obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)";}</script></head><body><form><textarea rows="5" cols="40" name="maxcharfield" id="maxcharfield" onKeyDown="textCounter(this,'progressbar1',20)" onKeyUp="textCounter(this,'progressbar1',20)" onFocus="textCounter(this,'progressbar1',20)" ></textarea><br /><div id="progressbar1" class="progress"></div><script>textCounter(document.getElementById("maxcharfield"),"progressbar1",20)</script></form></body></html><br><br><br><p><font color=red>//网站:http://www.pccode.net</font></p>