<form id="" name="" onsubmit="return a_js_func();" action="">
<input type="radio" name="name1" / onclick="form.action='***1'">
<input type="radio" name="name2" / onclick="form.action='***2'">
<input type="radio" name="name1" / onclick="form.action='***1'">
<input type="radio" name="name2" / onclick="form.action='***2'">
<form id="" name="form1" onsubmit="return a_js_func();" action="***1" method="post">
<input type="radio" name="name1" checked />
<input type="radio" name="name2" / onclick="form1.action='***2'">
<input type="radio" name="name" checked />
<input type="radio" name="name" / onclick="form1.action='***2'">
<input type="radio" name="name1" onclick="form.action='***1'" checked />
<input type="radio" name="name2" onclick="form1.action='***2'">
<input type="radio" name="sth" checked />
<input type="radio" name="sth" / onclick="form1.action='***2'" />现在登陆的页面在新窗口打开,如何能在打开新窗口后,原窗口中的密码输入框中自动清空呢,即那些代表密码的字符也就没了?
----------------------------
hehe :)
现在登陆的页面在新窗口打开,如何能在打开新窗口后,原窗口中的密码输入框中自动清空呢,即那些代表密码的字符也就没了?
---------------------------------
<form name="myForm" action="login.php" target="_blank" method="post">
...
<input type="password" name="pwd">
<input type="button" value="Submit" onClick="submitForm();">
...
</form>
<script>
function submitForm(){
document.getElementByName("pwd").value="";
myForm.submit();
}
</script>
the right one:
<form name="myForm" action="login.php" target="_blank" method="post">
...
<input type="password" name="pwd">
<input type="button" value="Submit" onClick="submitForm();">
...
</form>
<script>
function submitForm(){
myForm.submit();
document.getElementByName("pwd").value="";
}
</script>
...
<input type="password" name="password" />
<input type="image" src="" onclick="submitForm()" />
...
</form>
<script type="text/javascript">
function submitForm()
{
myForm.submit(); //我把这句去了,因为会出现两个新的登陆窗口
document.getElementByName("password").value = "";
}
</script>
这样不行呢