一、表單元素如果用js賦值刷新後,記錄是js賦值後的值而不是初始值
<html>
<head>
<script type="text/javascript">
function bb(){
var aa=document.getElementById_x("aa");
aa.value="3";
}
</script>
</head>
<body>
<form method="post">
<input id="aa" type="text" value="" onclick="bb();"/>
</form>
</body>
</html>
二、非表單元素如果用js賦值刷新後,記錄的是初始值
<html>
<head>
<script type="text/javascript">
function bb(){
var aa=document.getElementById_x("aa");
aa.innerHTML="33333";
}
</script>
</head>
<body>
<form method="post">
<a href="#" onclick="bb();" id="aa">wwww</a>
</form>
</body>
</html>