H5W3
当前位置:H5W3 > 其他技术问题 > 正文

【Web前端问题】submit元素在form表单的外面,点击后表单怎么会提交了呢?

<html dir="ltr" lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Zen Cart 中文版</title>
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
    <script language="javascript" src="includes/menu.js"></script>
    <script language="javascript" src="includes/general.js"></script>
    <script type="text/javascript">
        <!--
        function init() {
            cssjsmenu('navbar');
            if (document.getElementById) {
                var kill = document.getElementById('hoverJS');
                kill.disabled = true;
            }
            if (typeof _editor_url == "string") HTMLArea.replaceAll();
        }
        // -->
    </script>
                </head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"
      onLoad="init();document.forms['search'].elements['search'].focus();">


<div id="spiffycalendar" class="text"></div>


<!-- header //-->
<!-- All HEADER_ definitions in the columns below are defined in includes/languages/english.php //-->


<table border="0" width="100%" cellspacing="0" cellpadding="0" class="header">
        <tr>
        <td align="left" valign="top" height="50px"
            width="125px"><a href="/wp-content/uploads/aaacj/202104181234/5364113409.gif" border="0" alt="Zen Cart 管理中心" title=" Zen Cart 管理中心 "></a></td>
        <td colspan="2" align="left">
            <table width="100%">
                <tr>
                    <td align="left" class="main" valign="top"></td>
                                                                <td align="right" class="main" valign="top"><a href="/admin5/categories.php?cPath=&cID=1&action=edit_category&vcheck=yes"><img src="includes/languages/chinese/images/buttons/button_check_new_version.gif" border="0" alt="检查Zen Cart更新" title=" 检查Zen Cart更新 "></a>                            <br/>(本站版本:  v1.5.1)                        </td>
                                    </tr>
            </table>
        </td>
    </tr>
</table>




<table border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr class="headerBar">

        <td class="headerBarContent" align="left">
            &nbsp;        </td>
        <td class="headerBarContent" align="center">
            <b>Thu, 05 Feb 2015 18:01:44 +0800GMT&nbsp;[127.0.0.1 ]&nbsp;</b></td>
        <td class="headerBarContent" align="right">
        <a href="http://zencart151/admin5/index.php" class="headerLink">管理首页</a>&nbsp;|&nbsp;
        <a href="http://zencart151/index.php?main_page=" class="headerLink" target="_blank">商店首页</a>&nbsp;|&nbsp;
        <a href="http://www.zen-cart.cn/" class="headerLink" target="_blank">支持网站</a>&nbsp;|&nbsp;
        <a href="http://zencart151/admin5/server_info.php" class="headerLink">版本</a>&nbsp;|&nbsp;
        <a href="http://zencart151/admin5/admin_account.php" class="headerLink">帐号</a>&nbsp;|&nbsp;
        <a href="http://zencart151/admin5/logoff.php" class="headerLink">退出</a>&nbsp;        </td>
    </tr>
</table>




<div id="navbar">
    <ul class="nde-menu-system" onmouseover="hide_dropdowns('in');" onmouseout="hide_dropdowns('out');">
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">商店设置</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=1">基本设置</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=2">最小值</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=3">最大值</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=4">图像参数</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=5">客户资料</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=7">配送参数</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=8">商品列表</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=9">库存选项</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=10">日志选项</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=12">电子邮件</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=13">属性设置</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=14">GZip压缩</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=15">Sessions</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=11">条款选项</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=16">礼券和优惠券</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=17">信用卡</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=18">商品信息</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=19">布局设置</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=20">网站维护</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=21">新进商品</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=22">推荐商品</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=23">所有商品</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=24">商品索引</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=25">定义页面</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/configuration.php?gID=30">简易页面设置</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">商品管理</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/categories.php">商品分类</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/product_types.php">商品类型</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/products_price_manager.php">价格管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/options_name_manager.php">选项名称</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/options_values_manager.php">选项内容</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/attributes_controller.php">属性控制</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/downloads_manager.php">下载管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/option_name.php">选项名称排序</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/option_values.php">选项内容排序 </a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/manufacturers.php">厂商管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/reviews.php">评论管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/specials.php">特价商品</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/featured.php">推荐商品</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/salemaker.php">促销管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/products_expected.php">预售商品</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">模块管理</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/modules.php?set=payment">支付模块</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/modules.php?set=shipping">配送模块</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/modules.php?set=ordertotal">总额计算</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">客户管理</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/customers.php">客户资料</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/orders.php">订单管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/group_pricing.php">团体价格</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/paypal.php">PayPal付款通知</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">地区税率</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/countries.php">国家代码</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/zones.php">地区代码</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/geo_zones.php">地区设置</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/tax_classes.php">税率种类</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/tax_rates.php">税率管理</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">界面设定</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/currencies.php">货币代码</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/languages.php">语言代码</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/orders_status.php">订单状态</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">分析系统</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/stats_customers.php">订单统计</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/stats_customers_referrals.php">客户推荐</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/stats_products_lowstock.php">商品库存</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/stats_products_purchased.php">销售统计</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/stats_products_viewed.php">访问统计</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">工具</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/template_select.php">模板选择</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/layout_controller.php">外观控制</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/banner_manager.php">广告管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/mail.php">电子邮件</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/newsletters.php">电子商情/商品通知</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/server_info.php">服务器/版本信息</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/whos_online.php">在线名单</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/store_manager.php">商店管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/developers_tool_kit.php">开发工具</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/ezpages.php">简易页面管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/define_pages_editor.php">页面编辑</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/sqlpatch.php">安装SQL脚本</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">礼券优惠券</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/coupon_admin.php">优惠券管理</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/gv_queue.php">礼券队列</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/gv_mail.php">发送礼券</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/gv_sent.php">已发礼券</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">权限管理</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/profiles.php">管理权限</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/users.php">管理用户</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/admin_page_registration.php">管理页面注册</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/admin_activity.php">管理日志</a>
                        </li>
                                    </ul>
            </li>
                    <li>
                <a class="top"
                   href="http://zencart151/admin5/alt_nav.php">其他</a>
                <ul>
                                            <li>
                            <a href="http://zencart151/admin5/record_artists.php">歌手档案</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/record_company.php">唱片公司</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/music_genre.php">音乐类型</a>
                        </li>
                                            <li>
                            <a href="http://zencart151/admin5/media_manager.php">媒体管理</a>
                        </li>
                                            <li>
                            <a href="/wp-content/uploads/aaacj/202104181234/5365113412.gif|型号<img src="images/pixel_trans.gif" border="0" alt="" width="1" height="40"></td>
                <td align="right">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="smallText" align="right">
                                <form name="search" action="http://zencart151/admin5/categories.php" method="get">搜索:  <input type="text" name="search" />67</form>                            </td>
                        </tr>
                        <tr>
                            <td class="smallText" align="right">
                                <!-- 关闭或开启跳转到页面-->
                                <a href="/wp-content/uploads/aaacj/202104181234/5366113414.gif" border="0" alt="状态 - 关闭" title=" 状态 - 关闭 "></a>&nbsp;&nbsp;<form name="goto" action="http://zencart151/admin5/categories.php" method="get">转到: <select rel="dropdown" name="cPath" onChange="this.form.submit();">
<option value="0">首页</option>
<option value="1">硬件&nbsp;&nbsp;</option>
<option value="17">&nbsp;&nbsp;&nbsp;光驱&nbsp;&nbsp;</option>
<option value="16">&nbsp;&nbsp;&nbsp;内存&nbsp;&nbsp;</option>
<option value="4">&nbsp;&nbsp;&nbsp;显卡&nbsp;&nbsp;</option>
<option value="6">&nbsp;&nbsp;&nbsp;显示器&nbsp;&nbsp;</option>
<option value="8">&nbsp;&nbsp;&nbsp;键盘&nbsp;&nbsp;</option>
<option value="7">&nbsp;&nbsp;&nbsp;音箱&nbsp;&nbsp;</option>
<option value="9">&nbsp;&nbsp;&nbsp;鼠标&nbsp;&nbsp;</option>
<option value="2">软件&nbsp;&nbsp;</option>
<option value="19">&nbsp;&nbsp;&nbsp;动作&nbsp;&nbsp;</option>
<option value="18">&nbsp;&nbsp;&nbsp;模拟&nbsp;&nbsp;</option>
<option value="20">&nbsp;&nbsp;&nbsp;策略&nbsp;&nbsp;</option>
<option value="3">影视&nbsp;&nbsp;</option>
<option value="10">&nbsp;&nbsp;&nbsp;动作&nbsp;&nbsp;</option>
<option value="13">&nbsp;&nbsp;&nbsp;卡通&nbsp;&nbsp;</option>
<option value="12">&nbsp;&nbsp;&nbsp;喜剧&nbsp;&nbsp;</option>
<option value="5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打印机&nbsp;&nbsp;</option>
<option value="14">&nbsp;&nbsp;&nbsp;惊险&nbsp;&nbsp;</option>
<option value="15">&nbsp;&nbsp;&nbsp;戏剧&nbsp;&nbsp;</option>
<option value="11">&nbsp;&nbsp;&nbsp;科幻&nbsp;&nbsp;</option>
<option value="21">礼券&nbsp;&nbsp;</option>
<option value="22">链接商品&nbsp;&nbsp;</option>
<option value="23">测试样品&nbsp;&nbsp;</option>
<option value="28">九折测试&nbsp;&nbsp;</option>
<option value="25">属性九折测试&nbsp;&nbsp;</option>
<option value="24">免费赠品&nbsp;&nbsp;</option>
<option value="33">总分类&nbsp;&nbsp;</option>
<option value="34">&nbsp;&nbsp;&nbsp;子分类 2A&nbsp;&nbsp;</option>
<option value="40">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2A1&nbsp;&nbsp;</option>
<option value="43">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2A2&nbsp;&nbsp;</option>
<option value="35">&nbsp;&nbsp;&nbsp;子分类 2B&nbsp;&nbsp;</option>
<option value="37">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2B1&nbsp;&nbsp;</option>
<option value="38">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2B2&nbsp;&nbsp;</option>
<option value="39">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2B3&nbsp;&nbsp;</option>
<option value="36">&nbsp;&nbsp;&nbsp;子分类 2C&nbsp;&nbsp;</option>
<option value="41">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2C1&nbsp;&nbsp;</option>
<option value="44">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2C2&nbsp;&nbsp;</option>
<option value="42">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子分类 2C3&nbsp;&nbsp;</option>
<option value="48">促销商品&nbsp;&nbsp;</option>
<option value="45">&nbsp;&nbsp;&nbsp;九折&nbsp;&nbsp;</option>
<option value="47">&nbsp;&nbsp;&nbsp;属性九折&nbsp;&nbsp;</option>
<option value="31">&nbsp;&nbsp;&nbsp;忽略九折&nbsp;&nbsp;</option>
<option value="32">&nbsp;&nbsp;&nbsp;原价九折&nbsp;&nbsp;</option>
<option value="49">减价商品&nbsp;&nbsp;</option>
<option value="27">&nbsp;&nbsp;&nbsp;优惠5元&nbsp;&nbsp;</option>
<option value="52">&nbsp;&nbsp;&nbsp;优惠5元 无条件&nbsp;&nbsp;</option>
<option value="50">促销价格&nbsp;&nbsp;</option>
<option value="46">&nbsp;&nbsp;&nbsp;促销价100元&nbsp;&nbsp;</option>
<option value="51">&nbsp;&nbsp;&nbsp;促销价100元无条件&nbsp;&nbsp;</option>
<option value="53">无链接商品&nbsp;&nbsp;</option>
<option value="54">新特性商品&nbsp;&nbsp;</option>
<option value="60">&nbsp;&nbsp;&nbsp;下载&nbsp;&nbsp;</option>
<option value="56">&nbsp;&nbsp;&nbsp;属性&nbsp;&nbsp;</option>
<option value="55">&nbsp;&nbsp;&nbsp;批量优惠&nbsp;&nbsp;</option>
<option value="57">&nbsp;&nbsp;&nbsp;文字价格&nbsp;&nbsp;</option>
<option value="61">&nbsp;&nbsp;&nbsp;实物&nbsp;&nbsp;</option>
<option value="58">&nbsp;&nbsp;&nbsp;销售&nbsp;&nbsp;</option>
<option value="62">音乐&nbsp;&nbsp;</option>
<option value="63">文档&nbsp;&nbsp;</option>
<option value="64">混合商品类型&nbsp;&nbsp;</option>
</select>
note is form</form>                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </td><!-- 这里是头部标题,右边的搜索、跳转页面。eof -->
</tr>

<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<!--表格标题部分 -->
<tr class="dataTableHeadingRow">
    </tr><!--表格标题部分 -->
              <tr style="border:solid 2px red;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=1'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=2'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=3'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=21'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=22'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=23'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=28'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=25'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=24'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=33'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=48'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=49'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=50'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=53'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=54'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=62'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=63'">
        </tr>



                  <tr style="border:solid 2px green;" class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='http://zencart151/admin5/categories.php?cPath=64'">
        </tr>



    </table>
</td>
            <td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="infoBoxHeading">
    <td class="infoBoxHeading"><b>heading编辑分类</b></td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
    <td class="infoBoxContent">
    
    <!-- ------------------表单--------------------------------->
    <form name="categories" action="http://zencart151/admin5/categories.php?action=update_category&cPath=" method="post" enctype="multipart/form-data">
    <input type="hidden" name="securityToken" value="35e7a173ba5d2cceb889abe5732e0a8e" />
    <input type="hidden" name="categories_id" value="1" />
    </form>
    <!--------------------表单------------------------------------>
    </td>
  </tr>
  <tr>
    <td class="infoBoxContent">TEXT_EDIT_INTRO请做必要修改</td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br />TEXT_EDIT_CATEGORIES_NAME分类名称:TEXT_EDIT_CATEGORIES_NAMEx<br /><img src="/wp-content/uploads/aaacj/202104181234/5367113416.gif" border="0" alt="简体中文" title=" 简体中文 ">&nbsp;<input type="text" name="categories_name[2]" value="硬件" size = "33" maxlength = "32" /><br /><img src="/wp-content/uploads/aaacj/202104181234/5368113418.gif" border="0" alt="English" title=" English ">&nbsp;<input type="text" name="categories_name[1]" value="Hardware" size = "33" maxlength = "32" />$category_inputs_string</td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br />分类简介:<br /><img src="/wp-content/uploads/aaacj/202104181234/5367113416.gif" border="0" alt="简体中文" title=" 简体中文 ">&nbsp;<textarea name="categories_description[2]" wrap="soft" cols="100%" rows="20">我们提供各种各样的硬件,从打印机到显卡、鼠标、键盘等。</textarea><br /><img src="/wp-content/uploads/aaacj/202104181234/5368113418.gif" border="0" alt="English" title=" English ">&nbsp;<textarea name="categories_description[1]" wrap="soft" cols="100%" rows="20">We offer a variety of Hardware from printers to graphics cards and mice to keyboards.</textarea></td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br />TEXT_EDIT_CATEGORIES_IMAGE分类图像:<br /><input type="file" name="categories_image"  size="50"  /></td>
  </tr>
  <tr>
    <td class="infoBoxContent">image_dir_begin上传目录: <select rel="dropdown" name="img_dir">
<option value="">Main Directory</option>
<option value="3ds/">3ds</option>
<option value="attributes/">attributes</option>
<option value="banners/">banners</option>
<option value="categories/" selected="selected">categories</option>
<option value="dvd/">dvd</option>
<option value="gift_certificates/">gift_certificates</option>
<option value="gt_interactive/">gt_interactive</option>
<option value="hewlett_packard/">hewlett_packard</option>
<option value="icons/">icons</option>
<option value="large/">large</option>
<option value="manufacturers/">manufacturers</option>
<option value="matrox/">matrox</option>
<option value="medium/">medium</option>
<option value="microsoft/">microsoft</option>
<option value="samples/">samples</option>
<option value="sierra/">sierra</option>
<option value="uploads/">uploads</option>
</select>
image_dir_end</td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br /><strong>或从服务器上选择已有图像文件,文件名:</strong>&nbsp;<input type="text" name="categories_image_manual" /></td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br />1_begin<img src="/wp-content/uploads/aaacj/202104181234/5369113421.gif" border="0" alt="硬件" title=" 硬件 ">1_end</td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br />categories/category_hardware.gif</td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br /><strong>删除图像吗?</strong> 说明: 从商品中删除,但不删除图像文件: <input type="radio" name="image_delete" value="0" checked="checked" />&nbsp;否 <input type="radio" name="image_delete" value="1" />&nbsp;是</td>
  </tr>
  <tr>
    <td class="infoBoxContent"><br />排序:<br /><input type="text" name="sort_order" value="1" size="6" /></td>
  </tr>
  <tr>
    <td align="center" class="infoBoxContent"><br />
    
    
    <!----------------------提交按钮---------------------------------------->
    <input type="image" src="includes/languages/chinese/images/buttons/button_save.gif" border="0" alt="保存" title=" 保存 ">
    <!----------------------提交按钮---------------------------------------->
    
    
     <a href="/wp-content/uploads/aaacj/202104181234/5370113423.gif" border="0" alt="取消" title=" 取消 "></a></td>
  </tr>
  <tr>
    <td class="infoBoxContent">限制商品类型 <select rel="dropdown" name="restrict_type">
<option value="1">商品 - 普通</option>
<option value="2">商品 - 音乐</option>
<option value="3">文档 - 普通</option>
<option value="4">文档 - 商品</option>
<option value="5">商品 - 免运费</option>
</select>
&nbsp<input type="submit" name="add_type_all" value="增加 - 包含子分类">&nbsp<input type="submit" name="add_type" value="增加 - 不含子分类"></form></td>
  </tr>
</table>
            </td>

</tr>
<tr>
    <td class="alert" colspan="3" width="100%" align="center">
            </td>
</tr>
<tr>
    </tr>
</table>
</td>
</tr>
</table>
</td>
<!-- body_text_eof //-->
</tr>
</table>


<!-- body_eof //-->

<!-- footer //-->


<table border="0" width="100%" cellspacing="10" cellpadding="10">
    <tr>
        <td align="center" class="smallText" height="100" valign="bottom"><a href="http://www.zen-cart.cn"
                                                                             target="_blank"><img
                    src="images/small_zen_logo.gif" alt="Zen Cart:: 电子商务的艺术" border="0"></a><br/><br/>版权所有 &copy;
            2003-2015 <a href="http://www.zen-cart.cn" target="_blank">Zen
                Cart中文版</a><br/><a href="http://zencart151/admin5/server_info.php">Zen Cart v1.5.1/v1.5.1</a>        </td>
    </tr>
</table>


<!-- footer_eof //-->
<br/>
</body>
</html>

上面表单中只有securityToken 以及categories_id两个选项,但是表单提交(post方法)后$_POST数组中还有categories_name[],categories_description[]等其他的很多的选项,并且提交按钮并没有在这个表单

选项的里面而是正在外面,同时提交按钮好像没有绑定js事件,不知道是怎么回事?

一共只加载了两个js文件,感觉和这个表单提交也没有关系啊

general.js

function SetFocus() {
    if (document.forms.length > 0) {
        var field = document.forms[0];
        for (i = 0; i < field.length; i++) {
            if ((field.elements[i].type != "image") &&
                (field.elements[i].type != "hidden") &&
                (field.elements[i].type != "reset") &&
                (field.elements[i].type != "submit")) {

                document.forms[0].elements[i].focus();

                if ((field.elements[i].type == "text") ||
                    (field.elements[i].type == "password"))
                    document.forms[0].elements[i].select();

                break;
            }
        }
    }
}

function rowOverEffect(object) {
    if (object.className == 'dataTableRow') object.className = 'dataTableRowOver';
}

function rowOutEffect(object) {
    if (object.className == 'dataTableRowOver') object.className = 'dataTableRow';
}

menu.js

// combined config.js and cssjsmenu.js for performance reasons
// to save a cache check and an inline script

// config.js


checkForUpgrade();

function hide_dropdowns(what) {
    if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1)
        if (what == "in") {
            var anchors = document.getElementsByTagName("select");
            for (var i = 0; i < anchors.length; i++) {
                var anchor = anchors[i];
                if (anchor.getAttribute("rel") == "dropdown") {
                    anchor.style.position = "relative";
                    anchor.style.top = "0px";
                    anchor.style.left = "-2000px";
                }
            }
        } else {
            var anchors = document.getElementsByTagName("select");
            for (var i = 0; i < anchors.length; i++) {
                var anchor = anchors[i];
                if (anchor.getAttribute("rel") == "dropdown") {
                    anchor.style.position = "relative";
                    anchor.style.top = "0px";
                    anchor.style.left = "0px";
                }
            }
        }
}

function ndeSetStyleSheet(newtitle) {
    ndeCreateCookie('nde-style', newtitle, 365, false);
    if (ndeReadCookie('nde-style') == newtitle) {
        window.location.reload(true);
    }
    else {
        alert('You must enable Cookies in order for theme selection to work');
    }
}

function ndeSetTextSize(chgsize, rs) {
    if (!document.documentElement || !document.body) {
        return;
    }

    var newSize;
    var startSize = parseInt(ndeGetDocTextSize());

    if (!startSize) {
        startSize = 12;
    }

    switch (chgsize) {
        case 'incr':
            newSize = startSize + 2;
            break;

        case 'decr':
            newSize = startSize - 2;
            break;

        case 'reset':
            if (rs) {
                newSize = rs;
            }
            else {
                newSize = 12;
            }
            break;

        default:
            newSize = parseInt(ndeReadCookie('nde-textsize', true));
            if (!newSize) {
                newSize = startSize;
            }
            break;

    }

    if (newSize < 10) {
        newSize = 10;
    }

    newSize += 'px';

    document.documentElement.style.fontSize = newSize;
    document.body.style.fontSize = newSize;

    ndeCreateCookie('nde-textsize', newSize, 365, true);
}

function ndeGetDocTextSize() {
    if (!document.body) {
        return 0;
    }

    var size = 0;
    var body = document.body;

    if (body.style && body.style.fontSize) {
        size = body.style.fontSize;
    }
    else if (typeof(getComputedStyle) != 'undefined') {
        size = getComputedStyle(body, '').getPropertyValue('font-size');
    }
    else if (body.currentStyle) {
        size = body.currentStyle.fontSize;
    }
    return size;
}

function ndeCreateCookie(name, value, days, useLang) {
    var langString = useLang ? ndeGetLang() : '';

    var cookie = name + langString + '=' + value + ';';

    if (days) {
        var date = new Date();
        var ndeMilliSecondsInDay = 86400000; // 24*60*60*1000
        date.setTime(date.getTime() + (days * ndeMilliSecondsInDay));
        cookie += ' expires=' + date.toGMTString() + ';';
    }
    cookie += ' path=/';

    document.cookie = cookie;
}

function ndeReadCookie(name, useLang) {
    var langString = useLang ? ndeGetLang() : '';

    var nameEQ = name + langString + '=';
    var ca = document.cookie.split(';');

    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1, c.length);
        }

        if (c.indexOf(nameEQ) == 0) {
            return c.substring(nameEQ.length, c.length);
        }
    }
    return null;
}

function ndeSetTheme() {
    ndeSetTextSize();
    return true;
}

function ndeGetLang() {
    var langString = '';

    if (document.documentElement) {
        langString = document.documentElement.lang;
        if (langString != '') {
            langString = '-' + langString;
        }
    }
    return langString;
}

function checkForUpgrade() {
    var rvValue = -1;

    if (navigator.product == 'Gecko') {
        rvValue = 0;
        var ua = navigator.userAgent.toLowerCase();
        var rvStart = ua.indexOf('rv:');
        var rvEnd = ua.indexOf(')', rvStart);
        var rv = ua.substring(rvStart + 3, rvEnd);
        var rvParts = rv.split('.');
        var exp = 1;

        for (var i = 0; i < rvParts.length; i++) {
            var val = parseInt(rvParts[i]);
            rvValue += val / exp;
            exp *= 100;
        }
    }

    if (!document.getElementById || ( rvValue >= 0 && rvValue < 1.0)) {
        var updateMessageShown = ndeReadCookie('upgrade');
        if (!updateMessageShown) {
            ndeCreateCookie('upgrade', '1', 90);
            // check if cookie written. If not, don't redirect
            if (ndeReadCookie('upgrade')) {
                document.location = '/upgrade.html';
            }
        }
    }
}

function printAlert() {
    alert('Thanks to the use of a print-media stylesheet, this page is already printer-friendly!  Just print the article from a CSS-capable browser to get the print styles on paper.');
}

function init() {
    cssjsmenu('navbar');
    cssjsmenu('nde-config');
    if (document.getElementById) {
        var kill = document.getElementById('hoverJS');
        kill.disabled = true;
    }
}

// csjsmenu.js

function elementContains(elmOuter, elmInner) {
    while (elmInner && elmInner != elmOuter) {
        elmInner = elmInner.parentNode;
    }
    if (elmInner == elmOuter) {
        return true;
    }
    return false;
}

function getPageXY(elm) {
    var point = {x: 0, y: 0};
    while (elm) {
        point.x += elm.offsetLeft;
        point.y += elm.offsetTop;
        elm = elm.offsetParent;
    }
    return point;
}

function setPageXY(elm, x, y) {
    var parentXY = {x: 0, y: 0};

    if (elm.offsetParent) {
        parentXY = getPageXY(elm.offsetParent);
    }

    elm.style.left = (x - parentXY.x) + 'px';
    elm.style.top = (y - parentXY.y) + 'px';
}

/* ------------------------------------------------------------ */
/* file boundary */

function cssjsmenu(menuid) {
    var i;
    var j;
    var node;
    var child;
    var parent;

    // if the browser doesn't even support
    // document.getElementById, give up now.
    if (!document.getElementById) {
        return true;
    }

    // check for downlevel browsers
    // Opera 6, IE 5/Mac are not supported

    var version = '';
    var offset;

    offset = navigator.userAgent.indexOf('Opera');
    if (offset != -1) {
        version = parseInt('0' + navigator.userAgent.substr(offset + 6), 10);
        if (version < 7) {
            return true;
        }
        offset = navigator.userAgent.indexOf('Version/');
        version = parseInt('0' + navigator.userAgent.substr(offset + 8), 10);
        if (version >= 12 && navigator.userAgent.indexOf('Windows') != -1) version = 'Opera12win';
    }

    offset = navigator.userAgent.indexOf('MSIE');
    if (offset != -1) {
        if (navigator.userAgent.indexOf('Mac') != -1) {
            return true;
        }
    }

    var menudiv = document.getElementById(menuid);

    // ul
    var ul = new Array();

    for (i = 0; i < menudiv.childNodes.length; i++) {
        node = menudiv.childNodes[i];
        if (node.nodeName.toUpperCase() == 'UL') {
            ul[ul.length] = node;
        }
    }

    // ul > li
    var ul_gt_li = new Array();

    for (i = 0; i < ul.length; i++) {
        node = ul[i];
        for (j = 0; j < node.childNodes.length; j++) {
            child = node.childNodes[j];
            if (child.nodeName.toUpperCase() == 'LI') {
                ul_gt_li[ul_gt_li.length] = child;
                child.style.display = 'inline';
                child.style.listStyle = 'none';
                if (version != 'Opera12win') child.style.position = 'static';
            }
        }
    }

    // ul > li > ul
    var ul_gt_li_gt_ul = new Array();

    for (i = 0; i < ul_gt_li.length; i++) {
        node = ul_gt_li[i];
        for (j = 0; j < node.childNodes.length; j++) {
            child = node.childNodes[j];
            if (child.nodeName.toUpperCase() == 'UL') {
                ul_gt_li_gt_ul[ul_gt_li_gt_ul.length] = child;
                child.style.position = 'absolute';
                if (version != 'Opera12win') child.style.left = '-13em';
                child.style.visibility = 'hidden';

                // attach hover to parent li
                parent = child.parentNode;
                parent.onmouseover = function (e) {
                    var i;
                    var child;
                    var point;

                    // stop the pure css hover effect
                    this.style.paddingBottom = '0';

                    for (i = 0; i < this.childNodes.length; i++) {
                        child = this.childNodes[i];
                        if (child.nodeName.toUpperCase() == 'UL') {
                            point = getPageXY(this);
                            if (version != 'Opera12win') setPageXY(child, point.x, point.y + this.offsetHeight);
                            child.style.visibility = 'visible';
                        }
                    }
                    return false;
                };
                parent.onmouseout = function (e) {
                    var relatedTarget = null;
                    if (e) {
                        relatedTarget = e.relatedTarget;
                        // work around Gecko Linux only bug where related target is null
                        // when clicking on menu links or when right clicking and moving
                        // into a context menu.
                        if (navigator.product == 'Gecko' && navigator.platform.indexOf('Linux') != -1 && !relatedTarget) {
                            relatedTarget = e.originalTarget;
                        }
                    }
                    else if (window.event) {
                        relatedTarget = window.event.toElement;
                    }

                    if (elementContains(this, relatedTarget)) {
                        return false;
                    }

                    var i;
                    var child;
                    for (i = 0; i < this.childNodes.length; i++) {
                        child = this.childNodes[i];
                        if (child.nodeName.toUpperCase() == 'UL') {
                            child.style.visibility = 'hidden';
                        }
                    }
                    return false;
                };
            }
        }
    }
    return true;
}


回答:

type=image 本质也是和type=submit类似,只是多了图片的属性,属于图形化提交按钮。这种按钮点击后就触发默认表单提交事件。

详见 http://www.w3.org/TR/html401/interact/forms.html

本文地址:H5W3 » 【Web前端问题】submit元素在form表单的外面,点击后表单怎么会提交了呢?

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址