ajax onblur 用法

value为当前框中的值

<input  name=”num”type=”text”  onblur=”changeorder(id,this.value)”/>

<script>

 

function changeorder(id,value){

var url="<?=URL::site('admin_shipnews/ordernum')?>";
var data = {'id':id,'ordernum':ordernum;};
var success = function(response){
alert('排序更改成功!');
window.location.reload();
};
$.post(url,data,success,'json');

 

}

</script>

posted @ 2016-05-09 18:44  mokal同学  阅读(1043)  评论(0编辑  收藏  举报