0

我在侧 JavaScript 中编写 php 代码。

这个类型:-

function load(){
                var lan= "22.3000";
                var lng= "70.7833";
                var radius = "7000";
                var xml;
                var data = lan+","+lng+","+radius;
        xml = '<?php          echo file_get_contents("http://services.gisgraphy.com/geoloc/search?lat=23.00&lng=72.00&radius10000");?>'
                xmlDoc = $.parseXML( xml );
        $xml = $( xmlDoc );
           abc= xmlDoc.getElementsByTagName("asciiName")[0].firstChild.nodeValue;
        alert(abc);
            }


我想在页面加载时设置 php JavaScript 变量值 lan lng 和 radius

4

1 回答 1

2

what you want to do is to load your page then do an ajax call to load the page with the lat and lng and radius parameters.

于 2013-04-05T09:54:24.763 回答