-1
有人可以解釋這個ajax代碼做什麼?有人可以解釋這個ajax代碼做什麼?
function ajaxProgress(){
//Math.random() is for bitchy ie to prevent caching the xml.
$.get('sample.ff?do=progressInfo&type=sampletype&dummy='+Math.random(), { dataType: 'xml'}, function(xml) {
//if the import is running get infos about the progress...
if($('/importProgress/running', xml).text() == 'true') {
//..there are no infos yet, so it was just started..
if($('/importProgress/progress', xml) == null || $('/importProgress/progress', xml).text() == ''){
//do something
}
..........
setTimeout("ajaxProgress()", 1000);
我還有一個問題,我可以在ajax代碼中添加類似修訂的東西,當修訂版發生變化時,它會保持一個軌道,然後執行某些操作。修訂版來自struts操作。 – 2011-05-24 20:32:13