日期:2014-05-16  浏览次数:20485 次

谁能帮我解释一下 在这段代码里 autocomplete的作用是什么
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN "
"http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=shift_jis ">
<title> Sample </title>
<script   type= "text/javascript ">
<!--
function   acSet(flag)
{
document.myFORM.autocomplete   =   flag;
}
//   -->
</script>
</head>

<body>
<form   name= "myFORM "   method= "POST "   action= "mailto:openspc@po.shiojiri.ne.jp ">
<input   type= "text "   name= "myName "   autocomplete= "on "   VCARD_name= "vCard.Email "> <br>
<input   type= "submit "   value= "提交 "> <br>
<input   type= "button "   value= "1 "   onClick= "acSet=( 'on ') ">
<input   type= "button "   value= "2 "   onClick= "acSet=( 'off ') ">
</body>
</html>

在这段代码里1和2两个按钮要达到的显示效果是什么呢  


------解决方案--------------------
autocomplete 就是输入框是不是输入过自动记住
但是如果之前记住过,接下来代码修改了填加了这个属性,点上去还是会有历史的
------解决方案--------------------
像某些登陆框里会记住你的用户名一样,像Google会记住你曾输入的词一样,当然这些是浏览器干的