ajax onblur 用法

时间:2022-04-19 04:00:36

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>