jQuery的邮政数据 [英] Jquery Post Data

查看:118
本文介绍了jQuery的邮政数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用的链接或图片插入/更新数据。

I need to insert/update data by using link or image

我需要一个code如何使用jQuery调用后的数据!

I need a code how to call post data using jquery !

< A HREF =some.asp的onClick =someaction,送价值>链接

< a href="some.asp" onClick="someaction, value to send" > Link

请帮忙

推荐答案

HTML

<a href="some.asp" class="upload">Link</a>
<input type="hidden" name="parameter" value="value-to-send" />

code

Code

$(function() {
    $('.upload').click( function() {
         $.post( $(this).attr('href'),
                 $(this).next('input[type=hidden]').serialize(),
                 function(data) { do something with returned data } );
         return false;  // cancel link default action
    });
});

您可能还需要检查出的文档在 jQuery.com ,特别是对的如何jQuery的工程

You might also want to check out the documentation at jQuery.com, especially the section on How jQuery Works.

这篇关于jQuery的邮政数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆