There is some problem that I can't find out why the code worked on Safari, but failed on other browsers.
There is the html part and the main javascript part.
The main problem that I find is:
While executing the function downloadurl(url, function)
, cannot find the XML tags "Info", and the markers array length is 0 on many browsers. However, it's ok on Safari. The part of javascript code is like:
downloadUrl("http://travel-taoyuan.tycg.gov.tw/content/travel/xmlcontentlist1.aspx", function(doc) {
var xml = xmlParse(doc);
var markers = xml.documentElement.getElementsByTagName("Info");
......
To alert markers, it will return "0". And actually it should be "174"(Safari's result).
Thanks for answering my question.