<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > |
<html xmlns= "http://www.w3.org/1999/xhtml" > |
<head> |
</head> |
<body> |
|
<div class= "col-xs-9" > |
<textarea class= "form-control" rows= "3" id= "msg_content" name= "msg_content" |
|
onkeyup= "countChar('msg_content','counter');" |
|
onclick= "script:if(this.value=='感谢您的支持与关注,您的宝贵意见将帮助我们不断改进!'){this.value='';}" |
onblur= "script:if(this.value==''){this.value='感谢您的支持与关注,您的宝贵意见将帮助我们不断改进!';}" |
/>感谢您的支持与关注,您的宝贵意见将帮助我们不断改进!</textarea> |
|
</div> |
|
|
|
<script checkLen= "javascript" > |
function countChar(textareaNamezzjs,spanName){ |
document.getElementById(spanName).innerHTML=400-document.getElementById(textareaNamezzjs).value.length; |
} |
</script> |
可输入400字,剩余<span id= "counter" >400</span>字<br> |
|
</body> |
</html> |
初级程序员
by: 云代码会员 发表于:2016-06-20 09:58:09 顶(0) | 踩(0) 回复
很厉害的很厉害的很厉害的很厉害的
回复评论