//獲取form對象
var form=document.getElementById(‘my_form');
//用戶名input對象 user_name是對象的name屬性
var userName=form.user_name;
//用戶名清空
userName.value=‘';
//用戶密碼input對象 password是對象的name屬性
var password=form.password;
//用戶密碼清空
password.value=”;
新聞熱點(diǎn)
疑難解答
圖片精選