zoukankan      html  css  js  c++  java
  • Json 入门例子(form表单)【0】

    <script>
            $(function () {
         var aa = $("#fm").serialize().replace(/+/g, "");
         var ac = decodeURIComponent(aa);
         $("#fm").click(function () {
                alert(ac);
               });
    
            });
    
        </script>
    
        <form id="form1" name="form1" method="post" action="">
            <p>
                进货人 :
                <label for="name"></label>
                <input type="text" name="name" id="name" />
            </p>
            <p>
                性别:
                <label for="sex"></label>
                <select name="sex" size="1" id="sex">
                    <option value="1">男</option>
                    <option value="2">女</option>
                </select>
            </p>
            <table width="708" border="1">
                <tr>
                    <td width="185">商品名</td>
                    <td width="205">商品数量</td>
                    <td width="296">商品价格</td>
                </tr>
                <tr>
                    <td>
                        <label for="pro_name"></label>
                        <input type="text" name="pro_name" id="pro_name" />
                    </td>
                    <td>
                        <label for="pro_num"></label>
                        <input type="text" name="pro_num" id="pro_num" />
                    </td>
                    <td>
                        <label for="pro_price"></label>
                        <input type="text" name="pro_price" id="pro_price" />
                    </td>
                </tr>
                <tr>
                    <td><input type="text" name="pro_name2" id="pro_name2" /></td>
                    <td><input type="text" name="pro_num2" id="pro_num2" /></td>
                    <td><input type="text" name="pro_price2" id="pro_price2" /></td>
                </tr>
            </table>
            <p> </p>
            <input type="button" name="submit" onclick="onClik();" value="提交" />
        </form>
        <form id="fm">
    
            <input type="text" name="username" value="zhangsan" /><br /><br />
            <input type="text" name="age" value="12" /><br /><br />
            <input type="text" name="address" value="北京  朝阳" /><br /><br />
            <input type="text" name="job" value="IT" /><br /><br />
            <textarea name="content">abc + 123 + 456  </textarea>
            <input type="button" value="发送" onclick="add()" /><br /><br />
    
    
        </form> 
    

      

    转载 请注明原文地址并标明转载:http://www.cnblogs.com/laopo 商业用途请与我联系:lcfhn168@163.com
  • 相关阅读:
    用ildasm和ilasm对.net下的exe程序进行破解初探
    随笔--各种概念等等
    C#高级编程学习一-----------------第五章泛型
    visual studio相关操作
    webservice开发
    delphi各种错
    android开发文章收藏
    android开发遇到的问题
    android应用开发基础知道
    数据库各种问题
  • 原文地址:https://www.cnblogs.com/laopo/p/4757260.html
Copyright © 2011-2022 走看看