<script type="text/javascript">
function initialize() {
var markers = JSON.parse('[{"title":"Chennai","lat":"12.897400","lng":"80.288000","Description":"welcome to chennai"},{"title":"Hyderabad","lat":"17.266700","lng":"78.530200","Description":"welcome to hyderabad"},{"title":"Banglore","lat":"12.897400","lng":"77.519500","Description":"welcome to Banglore"},{"title":"vishkapatnam","lat":"17.518300","lng":"83.320300","Description":"welcome to Vishkapatnam"}]');
var mapOptions = {
center: new google.maps.LatLng(markers[0].lat, markers[0].lng),
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
我得到的JSON沒有找到微軟?那麼我該怎麼做?在IE兼容模式下未定義JSON對象
的哪個版本IE(我想)你在用嗎? –
我正在使用IE8先生 – Sambasiva
這很奇怪,在IE8中它應該已經完全支持,無論如何閱讀這裏:http://stackoverflow.com/questions/4908875/is-json-parse-supported-by-all-major-瀏覽器 –