input输入框输入提示
为了提高用户体验我们常常会在用户输入信息,还未提交之前给用户提示,这样就达到的提高用户体验的基本的.
<html><body><div style="border:1px dashed #ccc;width:300px;height:200px;padding:20px"><input type="text" name="test" id="test" /> <span style="color:red;font-weight:bold" id="help"></span><script type="text/javascript">document.getElementById("test").onclick=function(){if(document.getElementById("help").innerHTML==""){document.getElementById("help").innerHTML="请输入汉字";}}</script></div></body></html>
心有多大,舞台就有多大。