求大神指点,新手,请各位详细指点

解决方案 »

  1.   

    这是一种水印。jquery water 插件很容易就能实现
      

  2.   


    <li>身份证:<input name="ctl00$username" type="text" value="请输入您的身份证号" id="ctl00_username" onfocus="onname();" onblur="offname();" style="width:157px;color: Gray;" /></li>function onname() {
                var t1 = document.getElementById("ctl00_username");
                if (t1.value == "请输入您的身份证号") {
                    t1.value = "";
                    t1.style.color = 'black';
                }          
            }
            function offname() {
                var t1 = document.getElementById("ctl00_username");
                if (t1.value == "") {
                    t1.style.color = 'Gray';
                    t1.value = "请输入您的身份证号";            }           
            }