Usage:
First, jquery and this plugin are introduced into head
<script type= "Text/javascript" src= "jquery-1.7.2.min.js" >script>
<script type= "Text/javascript" Src= "Jquery.enplaceholder.js" >script>
And then you can call the bird
Simulates placeholder
$ (' input ') by value. placeholder ();
Simulates placeholder
$ (' input ') by inserting elements. Placeholder ({isusespan:true});
Code:
<script type= "Text/javascript" src= "/demo/js/jquery.min.js" ></script><script type= "Text/javascript" "Src="/demo/js/38/jquery.enplaceholder.js "></script> <style type=" Text/css "> Body {font:12px/1.5" SimSun '; form {width:420px; height:260px margin:20px Auto 0;} h3 {font-weight:bold; margin:10px 0;} p {margin-bottom: 10px; input {vertical-align:middle; margin-left:10px; height:24px; line-height:24px; width:200px; padding-left:2px;} t Extarea {vertical-align:middle; margin-left:10px; width:200px; height:50px; font:inherit; padding-left:2px;} Wrap -statistics {Visibility:hidden} html{color: #000; background: #fff;} Body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6, form,input,textarea,p,th,td,hr,button{margin:0;padding:0;} body,button,input,select,textarea{font:12px/1.5
Tahoma,arial;}
input,select,textarea{font-size:100%;} table{border-collapse:collapse;border-spacing:0;} Th{text-align:inherit;}
img{border:0;} Iframe{display:block;}em,th{font-style:normal;font-weight:500} ol,ul {list-style:none;} h1,h2,h3,h4,h5,h6{font-size:100%;font-weight
: 500;}
A{text-decoration:none;} a:hover{text-decoration:underline;} . fn-clear{zoom:1; Fn-clear:after{visibility:hidden;display:block;font-size:0;content: ".";
clear:both;height:0;} . Fn-hide{display:none}. Fn-left,.fn-right{display:inline}. fn-left{float:left;. Fn-right{float:right;}. Fn-hide-text{font-size:0;line-height:0;color:rgba (0,0,0,0); Sl-wrap,.sl-wrap td,.sl-wrap Th{word-wrap:
Break-word;word-break:break-all;} . sl-wrap-table{table-layout:fixed;} </style> <form id= "Form1" >