如果某一要素被点击,是否可以采用POST方法提交一个身份证? 我认为,“Query”在AJAX fanction建造了一座建筑。
<span id="submitThisID"></span>
如果某一要素被点击,是否可以采用POST方法提交一个身份证? 我认为,“Query”在AJAX fanction建造了一座建筑。
<span id="submitThisID"></span>
$( #submitThisId ).click(function() {
$.post("postTo.php", { id: $(this).attr( id ) }, function(response) {
alert(response);
});
});
这将使您的出任。 可查阅:$id =_$_POST[id];
。
Whatever the postTo.php file returns will be alerted to the screen (response).
http://www.un.org。 送上同一页并做一些服务器方面的行动(问询等),你只需要把类似于以下代码的东西放在你网页上:
<?php
if (isset($_POST[ id ])) {
$id = $_POST[ id ];
// Perform some db queries, etc here
$response = Format a response here ; // Format a response
// This will return your formatted response to the $.post() call in jQuery
return print_r($response);
}
?>
当这种“答复”(文本、html等)被退回到“质量”时,你可以使用简单的 j子,在必要时将其插入网页,并改变页面。
#submitThisID.post(
http://example.com/ ,
{
foo : bar ,
},
function (data) {
console.log( data: + data );
}
);
It s definitely possible: $.post()
.
然而,你的问题没有意义。 设在吉大港的吉大港山区员额的提价以数字/数值为平价。 http://en.wikipedia.org/wiki/POST_%28HTTP%29”rel=“nofollow”POST Body。
Name: Jonathan Doe
Age: 23
内容识别是否为名称或价值? 什么是?
是的:。
$( #submitThisID ).click(function({
var id = $(this).attr( id );
$.ajax({
url: /index.php/ajax/ ,
type: post ,
dataType: json ,
data:{
id:id;
},
success:function(data){
console.log( ajax success! );
}
});
});
The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.
I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...
Ok, I m stumped. Basically, this script works fine in FF, but not in IE (6,7 or 8) - in which it returns an "Object doesn t support this property or method" error. Any ideas?: function ...
What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...