function changePost()
{
if (document.getElementById("newpassword").value!=document.getElementById("passwordagain").value)
{
alert("New password does not match!")
}
else
{
var eForm=document.createElement("form");
document.body.appendChild(eForm);
eForm.method="post";
var newElement=document.createElement("input");
newElement.setAttribute("name","name");
newElement.setAttribute("type","hidden");
eForm.appendChild(newElement);
newElement.value=document.getElementById("nickname").value;
var newElement1=document.createElement("input");
newElement1.setAttribute("name","question");
newElement1.setAttribute("type","hidden");
eForm.appendChild(newElement1);
newElement1.value=document.getElementById("question").value;
var newElement2=document.createElement("input");
newElement2.setAttribute("name","answer");
newElement2.setAttribute("type","hidden");
eForm.appendChild(newElement2);
newElement2.value=document.getElementById("answer").value;
var newElement3=document.createElement("input");
newElement3.setAttribute("name","newpassword");
newElement3.setAttribute("type","password");
eForm.appendChild(newElement3);
newElement3.value=document.getElementById("newpassword").value;
var newElement4=document.createElement("input");
newElement4.setAttribute("name","oldpassword");
newElement4.setAttribute("type","password");
eForm.appendChild(newElement4);
newElement4.value=document.getElementById("oldpassword").value;
var newElement5=document.createElement("input");
newElement5.setAttribute("name","passwordagain");
newElement5.setAttribute("type","password");
eForm.appendChild(newElement5);
newElement5.value=document.getElementById("passwordagain").value;
eForm.submit();
}
}
function check_all(obj,cName)
{
var checkboxs = document.getElementsByName(cName);
for(var i=0;i
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
没看你具体代码,但是你说的那个有问题的方法里有语法错误
冒号改成逗号
跑不起来了?为什么?报什么错.贴上来