-1
我有這樣的代碼解釋一段jQuery代碼
function deleteNode(options) {
$.ajaxService({
url: 'http://localhost:1209/Pages/services.aspx/Page_load',
data: { servicename: 'deletenode', nodename:""},
LoaderConteiner: "#message",
onStartService: function() { $(".failed-message,.success-message").hide(); },
onEndService: function() {},
onResponse: function (response) {
switch (response.result) {
case "1":
$.pushMessage({ message: 'ok', messageClass: 'success-message', delay: 6000, container: '#changemessage' });
break;
default:
$.pushMessage({ message: 'error', messageClass: 'failed-message', delay: 8000, container: '#changemessage' });
}
}
});
}
,並調用這個函數
deleteNode({ target: this });
我對這個代碼
解釋什麼的「選項」和角色「目標:這個「?
變量'選項'永遠不會被引用。這是誰的代碼? –
這個功能看起來並不像是在刪除一個節點...... – rednaw
@LayTaylor whta的目標是:這個? – user3054913