之前寫過的、但沒記起來總是會忘、為了避免一直重查還是記錄下來好了

<script type="text/javascript">
<!--

//刪除時先確認
function confirmation(id) {
var answer = confirm("確定刪除?");
if (answer){
location.href = "IosDeltestocr.php?delid=" + id;
}

}

//input text一旦被更改則同步寫入資料庫

function onChangeocrname(changeVal) {
//alert("Value is " + changeVal.value + changeVal.id);
$.ajax({
url:'IosWebocrjs.php',
type:'POST',
data:{
'id':changeVal.id,
'ocr_name':changeVal.value
} ,
dataType:'html',
timeout:1000,
error:function(){alert('error loading PHP document');}
//success:function(result){alert(result);}
});
}


function onChangeocremail(changeVal) {
//alert("Value is " + changeVal.value + changeVal.id);
$.ajax({
url:'IosWebocrjs.php',
type:'POST',
data:{
'id':changeVal.id,
'ocr_email':changeVal.value
} ,
dataType:'html',
timeout:1000,
error:function(){alert('error loading PHP document');}
//success:function(result){alert(result);}
});
}
-->
</script>

arrow
arrow
    全站熱搜

    result945 發表在 痞客邦 留言(0) 人氣()