标签:meta dtd char XML 内容 this asc his head
<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
<script type="text/javascript">
window.onload=function(){
var otext=document.getElementById("text");
var otextws=document.getElementById("textws");
//获得焦点时
otext.onfocus=function(){
if(this.value=="请输入内容"){
this.value="";
}
}
//失去焦点时
otext.onblur=function(){
if(this.value==""){
this.value="请输入内容";
}
}
</script>
</head>
<body>
<input type="text" id="text" value="请输入内容"/>
<input type="button" id="textws" value="全选"/>
</body>
</html>
标签:meta dtd char XML 内容 this asc his head
原文地址:http://www.cnblogs.com/hwmbh/p/7742226.html