1. var code = document.getElementById("pwd_code"); 通过id获得value } 转载于:https://www.cnblogs.com/alaricblog/p/3278335.html