onclick="javascript:window.open('http://61.177.147.141/Web/Common/Main.aspx')"
window.open换了

解决方案 »

  1.   

    用html可能达不到和数据库连接,要通过JSP,PHP,或者ASP来实现。
      

  2.   

    谢谢两位。
    那么在jsp中应该如何做呢,再请赐教
      

  3.   

    <script>
      function f()
        {
    .....    }
    </script>
    <a href="NN.jsp" onclick="f()">dddddddddd</a>
      

  4.   

    大侠们能不能具体说说。
    比如一个登陆页面,输入用户名和密码,点击确定:<form name="form1" method="post" action="chklogin.jsp" onSubmit="return chklogin();">
    <input type="submit" name="Submit" value="登录">我要怎么换成超链传值 ?
      

  5.   

    <a href='1.jsp?username=<%=name%>&password=<%=pwd%>'>submit<a>是这个意思吗
      

  6.   

    比如一个登陆页面,输入用户名和密码,点击确定:<form name="form1" method="post" action="chklogin.jsp" onSubmit="return chklogin();">
    <input type="submit" name="Submit" value="登录">这个chklogin.jsp的作用是检验输入的用户名和密码是否正确,代码如下:
    <jsp:useBean id="chklogin" class="login.chk_login"  scope="page"/>
    <% String uname=request.getParameter("uname").trim();
       String pwd=request.getParameter("pwd").trim();
       boolean bol=chklogin.chk(uname,pwd);
       if(bol){
                Cookie userup=new Cookie("userup","true");
    Cookie username=new Cookie("uname",uname);
    Cookie password=new Cookie("pwd",pwd);
    username.setMaxAge(365*24*60);
    password.setMaxAge(365*24*60);
    response.addCookie(userup);
    response.addCookie(username);
    response.addCookie(password);
    response.sendRedirect("index.jsp");
    }
    else  response.sendRedirect("login.jsp");
    %>
    我把那个“确定”按钮换成了<a href="http://localhost:9191/ss1/chklogin.jsp">登录</a>就出错了:The server encountered an internal error () that prevented it from fulfilling this request.exception