zoukankan      html  css  js  c++  java
  • document.getElementById("in").submit();

    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>输入页</title>
    </head>
    <body>
    <form id="in" action="SortPage" method="post">
    <input type="text" name="num" id="demo"/>
    <input type="button" value="提交" onclick="check()"/>
    <input type="button" value="注销" onclick="logout()"/>
    </form>
    <script type="text/javascript">
    function logout(){
    window.location.href = "Remove";
    }

    function check()
    {
    var x=document.getElementById("demo").value;
    if(x==""||isNaN(x))
    {
    alert("只能输入数字!");
    }
    else
    {
    document.getElementById("in").submit(); //提交表单,页面跳 转,执行排序类,跳转到显示页面。
    }
    }
    </script>
    </body>
    </html>



  • 相关阅读:
    将Infopath转成PDF
    调用MOSS API取document时出现out of memeory错误
    jquery dialog中mvc客户端验证无效
    Windows Service开发点滴20130622
    CentOS
    nginx
    VIM
    nodejs weixin 笔记
    nodejs mysql
    nodejs 笔记
  • 原文地址:https://www.cnblogs.com/cyy-13/p/5780206.html
Copyright © 2011-2022 走看看