前端面页性能优化

表单性能优化 HTML 代码 <form id="my-form" action=""> <input type="text" name="name"> <input type="password" name="password"> </form> <input id="btn" type="button" value="获取表单数据"/> JavaScript 代码 var myForm = document.getElementById("my-form"); var name,password; btn.onclick = function(){ name = myForm["name"].va...

2018
06-16