zoukankan      html  css  js  c++  java
  • 表单根据不同的提交按钮转向不同的页面操作

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>平台</title>
    </head>
    <style>
    </style>
    <body>
            <div class="formstyle" style="50%;">
            <!--<form action="<?php // echo site_url('lol_reward/ip_whitelist_tool/ip_check'); ?>"  method="post"  id="myform" style="25%"> -->
            <form id="myform" style="25%" method="post">
            <table border= "0">
            <tr>    
                    <td>    
                            <strong><label style="margin-left:100px">IP地址:</label></strong>
                    </td>   
                    <td>    
                            <input class="biginput" name="ip_address">
                    </td>   
            </tr>   
            <tr>    
                    <td>    
                            <input style="margin-left:100px" value="查询" class="btnshort"  id="check" onclick="ip_check()"/>
                    </td>   
                    <td>    
                            <input style="margin-left:100px"  value="添加" class="btnshort" id="add" onclick="ip_add()"/>
                    </td>   
            </tr>   
            </form> 
            </div>  
    <script>
    function ip_check()
    {
            x=document.getElementById("myform");
            x.action="<?php echo site_url('lol_reward/ip_whitelist_tool/ip_check'); ?>";
            x.submit();
    }
    
    
    function ip_add()
    {
            x=document.getElementById("myform");
            x.action="<?php echo site_url('lol_reward/ip_whitelist_tool/ip_add'); ?>";
            x.submit();
    }
    
    </script>
    
    
    </body>
    </html>

     程序猿必读

  • 相关阅读:
    pl sql 编程
    maven(一) maven到底是个啥玩意~
    Oracle 数据库管理员
    Oracle 常用函数
    Oracle 事务
    Oracle 分页
    java String类
    java 方法
    java 数组
    java 跨平台 数据类型 修饰符 程序结构
  • 原文地址:https://www.cnblogs.com/longzhongren/p/4627524.html
Copyright © 2011-2022 走看看