请教Java里面的一段话的意思.看不懂function registerClick(){if(window.sessionStorage && window.localStorage){var userName = document.getElementById('txtUserName');var userPwd = document.getElementById('pwd');window.sessionStorage[userName
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 03:22:18
请教Java里面的一段话的意思.看不懂function registerClick(){if(window.sessionStorage && window.localStorage){var userName = document.getElementById('txtUserName');var userPwd = document.getElementById('pwd');window.sessionStorage[userName
请教Java里面的一段话的意思.看不懂
function registerClick()
{
if(window.sessionStorage && window.localStorage)
{
var userName = document.getElementById('txtUserName');
var userPwd = document.getElementById('pwd');
window.sessionStorage[userName] = userName.value;
window.sessionStorage[userPwd] = userPwd.value;
window.localStorage[userName] = userName.value;
window.localStorage[userPwd] = userPwd.value;
window.open('refresh.html');
}
}
请教Java里面的一段话的意思.看不懂function registerClick(){if(window.sessionStorage && window.localStorage){var userName = document.getElementById('txtUserName');var userPwd = document.getElementById('pwd');window.sessionStorage[userName
html5 web数据的本地存储 点击注册按钮会触发这个js
var userName = document.getElementById('txtUserName');
var userPwd = document.getElementById('pwd');
两句分别获得用户名和密码
window.sessionStorage[userName] = userName.value;
window.sessionStorage[userPwd] = userPwd.value;
window.localStorage[userName] = userName.value;
window.localStorage[userPwd] = userPwd.value;
这4句将上面获得的用户名和密码
放入session和写入本地文件中
最后打开refresh.html .