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>
<style>
#div1{width: 400px;margin: 20px auto;border: 1px solid #ccc}
#div1 p{float: right;margin: 0;font-size: 13px;}
#div1 textarea{width: 400px;height: 280px;}
#div1
a{background:
#ccc;float:
right;color:
#FFFFFF;text-align:
center;background:
#00FF00;width: 50px;height: 30px}
#div1 a.dis{background: #ccc;color: black;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
window.onload=function ()
{
var oDiv=document.getElementById('div1');
var oP=oDiv.getElementsByTagName('p')[0];
var oT=oDiv.getElementsByTagName('textarea')[0];
var oA=oDiv.getElementsByTagName('a')[0];
var bool=true;
var ie=!-[1,];
var timer=null;
var num=0;
//
给文本框加聚焦事?/p>
oT.onfocus=function()
{
if(bool)
{
oP.innerHTML='
你还可以输入
<span>90</span>
?/p>
';
bool=false;
}
}
oT.onblur=function()
{
if(oT.value=='')
{
oP.innerHTML='
请输入你的留言
';
bool=true;
}
}
//
输入内容,计算字?/p>