function nameBlur()
{
var nameval= document.getElementById(name).value;
if(nameval == "")
{
document.getElementById("pname").innerHtml="name not null";
}else
{
name = true;
document.getElementById("pname").innerHtml="";
} } 然后在id为name的标签里面加Onblur="nameBlur()"
document.onload=function(){
var nameval=document.getElementById("name").value;
if(nameval == "")
{
document.getElementById("pname").innerHtml="name not null";
}else
{
name = true;
var pname= document.getElementById("pname");
pname.parentNode.removeChild(pname);
}
}
jquery.js里面全有,打开看看就知道该如何用JS解释jquery了