如何定位
<input type="submit" value="submit" />
使用<form>
ajax。下面是我的代码:
$(document).ready(function(){
$("#loading").hide();
<?php $type_temp = (!empty($type)) ? 'company/' .$type:'company';?>
$("#search_id").click(function(){
$("#loading").show();
$("#tbl").hide();
$.get("<?php echo url_for('/AdmSys_dev.php/' .$type_temp); ?>", $("#send_search").serialize(), function(data){
//alert(data);
$("#tbl").show();
$("#sf_admin_content").html(data);
});
});
});
下面的html代码:
<div style="margin-bottom:20px;">
<form id="send_search" action="" method="get">
<input type="text" name="search" placeholder="Search: " value="<?php echo $search; ?>" />
<input id="search_id" type="button" value="Search" />
</form>
</div>
你已经注意到我的输入类型是按钮我希望它是输入类型提交我想将输入类型定位到使用上面的 jquery 提交到表单...