zoukankan      html  css  js  c++  java
  • ajaxform使用

    需要引入  jquery.form.js  jquery.js

    1.提交的表单

    <form id="myForm" action="comment.php" method="post"

        Name: <input type="text" name="name" /> 
        Comment: <textarea name="comment"></textarea> 
        <input type="submit" value="Submit Comment" /> 
    </form>



    2.
    ajaxForm调用,会把name属性的值提交上去


    <html
    <head
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> 
        <script src="http://malsup.github.com/jquery.form.js"></script> 
     
        <script
            // wait for the DOM to be loaded 
            $(document).ready(function() { 
                // bind 'myForm' and provide a simple callback function 
                $('#myForm').ajaxForm(function() { 
                    alert("Thank you for your comment!"); 
                }); 
            }); 
        </script> 
    </head> 

    官方网址:http://malsup.com/jquery/form/
  • 相关阅读:
    浏览器检测
    EcmaScript基础
    js中的内置对象
    cursor 与refcursor及sys_refcursor的区别 (转载)
    各种连接数据方法的网站
    UVa11627 Slalom
    UVa1450 Airport
    UVa12124 Assemble
    UVa11384 Help is needed for Dexter
    UVa11464 Even Parity
  • 原文地址:https://www.cnblogs.com/ldybyz/p/5940953.html
Copyright © 2011-2022 走看看