<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript">
<!--
function show_text(a)
{
if(a=="ddd")
    {
document.form1.action="login.asp"
document.form1.submit
    }
if(a=="ccc")
   {
   window.open("login2.asp","","width=300,height=500")
document.form1.action="login2.asp"
document.form1.submit
   }
}-->
</script>
</head><body>
<form name="form1" method=post action="login.asp">
用户名:<input type="text" name="userID" size="10" maxlength="20">
密码<input type="password" name="password" size="10" maxlength="8">
<br>
<input type="image" src="images/anniu_3.jpg" border="0" onClick="">
<input type="image" src="images/anniu_4.jpg" border="0" onClick="">
</form></body>
</html>
这样写=====

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript">
    <!--
    function show_text(a)
    {
    if(a=="ddd")
        {
    document.form1.action="login.asp"
    document.form1.submit
        }
    if(a=="ccc")
       {
       window.open("login2.asp","","width=300,height=500")
    document.form1.action="login2.asp"
    document.form1.submit
       }
    }-->
    </script>
    </head><body>
    <form name="form1" method=post action="login.asp">
    用户名:<input type="text" name="userID" size="10" maxlength="20">
    密码<input type="password" name="password" size="10" maxlength="8">
    <br>
    <input type="image" src="images/anniu_3.jpg" border="0" onClick="show_text(a=="ddd")">
    <input type="image" src="images/anniu_4.jpg" border="0" onClick="show_text(a=="ccc")">
    </form></body>
    </html>
    写掉了一些东西
      

  2.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript">
    <!--
    function show_text(a)
    {
    if(a=="ddd")
        {
    document.form1.action="login.asp"
    document.form1.submit
        }
    if(a=="ccc")
       {
       
    document.form1.target="_blank"
    document.form1.action="login2.asp"
    document.form1.submit
       }
    }-->
    </script>
    </head><body>
    <form name="form1" method=post action="login.asp" >
    用户名:<input type="text" name="userID" size="10" maxlength="20">
    密码<input type="password" name="password" size="10" maxlength="8">
    <br>
    <input type="image" src="images/anniu_3.jpg" border="0" onClick="show_text(a=="ddd")">
    <input type="image" src="images/anniu_4.jpg" border="0" onClick="show_text(a=="ccc")">
    </form></body>
    </html>
    对不起---写错一点----自己仔细看看