Jquery发布数据

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

我需要一个代码如何使用jquery调用post数据!

链接

请帮忙

HTML

Link  

 $(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如何工作的部分。

查看Jquery-Documentation并稍后通过附加触发器来更改函数调用,以使它看起来像这样:

HTML:

 My link 

码:

  $("#myid").click(function() { $.ajax({ type: 'POST', url: 'https://stackoverflow.com/questions/1617750/jquery-post-data/some.asp', success: function(result) { if(result != "false") { $("#result").html(result); } } }) }); 

(另)