使用这段代码,如果它formOne.classname = "";
是独立的,它会完美地工作,并且表单会被隐藏。但是为什么当我在它周围有其他代码行时,它只执行一秒钟然后返回到它的原始状态?
var name = formOne.name.value;
var email = formOne.email_address.value;
var e = document.getElementById("typeOfWork");
var q = e.options[e.selectedIndex].text;
var work = q;
formTwo.className = "form2Vis";
document.getElementById("name1").value= name;
var d = document.forms['formTwo'].elements['name1'].value;// = name;
formOne.className = "form1Hidden";