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>



  • 相关阅读:
    函数声明例子
    税收工资分级
    attribute函数
    输出结果有误
    scanf_s()函数与数组,运行环境VS2013
    格式化输出
    功能点介绍和用户场景
    第二次作业合作版
    word count
    第一次作业
  • 原文地址:https://www.cnblogs.com/cyy-13/p/5780206.html
Copyright © 2011-2022 走看看