Home >Web Front-end >JS Tutorial >Detailed analysis of the difference between refresh of form elements and non-form elements_Basic knowledge

Detailed analysis of the difference between refresh of form elements and non-form elements_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:17:081249browse

1. If the form element is refreshed with js assignment, the record will be the value after js assignment instead of the initial value


< script type="text/javascript">
function bb(){
var aa=document.getElementById_x("aa");
aa.value="3";
}







2. If non-form elements are refreshed with js assignment, the initial value is recorded