文本框限制字数
<table width="400" border="0" cellspacing="0" cellpadding="0"><tr valign="middle" bgcolor="#F3F3F3"><td height="26" valign="top" align="left"> <textarea name="个人介绍" cols="50" rows="6" id="youbian" onkeyup="checkLength(this);">http://Music.17gb.com</textarea> <br> 限制字数显示剩余字数,最大长度: 500还剩: <span id="chLeft">500</span><br></td></tr><script type="text/javascript">function checkLength(which) {var maxChars = 500;if (which.value.length > maxChars)which.value = which.value.substring(0,maxChars);var curr = maxChars - which.value.length;document.getElementById("chLeft").innerHTML = curr.toString();}</script></table>? 1 楼 yujiao_liu5322 2012-03-27 vcvv 贝多芬该表