<script type="text/javascript">javascript
$(document).ready(function() {php
validForm('artitleForm', function(){java
$.post('postRequestUrl', $('#artitleForm').serialize(), function(data){ide
// 強制成功請套入後刪除,上面的php地址更換爲提交後的頁面post
var resp = eval("("+data+")");spa
if(resp.status == 'success'){orm
fbox({type:'success', msg:resp.message, delayClose:1000, boxArgs:{ onClosed: function(){ parent.$.fancybox.close(); window.parent.location.reload();} }});ip
}else if(resp.status == "error"){it
fbox({type:'error', msg:resp.message, delayClose:1000});io
}else if(resp.status == 'validate'){
eval(resp.message);
}
});
}); //表單驗證
}); //編輯圖像
</script>