ASP调用JS方法得到值然后返回,添加到数据库里面去 <script language="javascript"> function showPoint(searchResult) { if(searchResult.searchPoints.length>0) { var poi=searchResult.searchPoints[0]; //alert(poi.name+'\nNTU坐标:'+poi.point); return poi.point; } else { //alert('无结果'); return; } } var search=new LTLocalSearch(showPoint); search.setCity('广州'); //设置城市 search.search('**大厦'); //开始搜索 </script>
<%dim aaa
Sql="select * from [user]" rs.Open Sql,StrConnect,1,1 Do While Not rs.EOF asp代码调用showPoint(参数为rs里面的数据)方法 把返回的值传给 aaa set rssql=server.CreateObject("adodb.recordset") rssql.Open "select zycp,bm,zw,Flag,[User] from Websen_corporation",conn,1,3 rssql("zycp")=aaa rssql.AddNew rssql.Update Rs.MoveNext Loop
Sql="select * from [user]" rs.Open Sql,StrConnect,1,1 Do While Not rs.EOF asp代码调用showPoint(参数为rs里面的数据)方法 把返回的值传给 aaa set rssql=server.CreateObject("adodb.recordset") rssql.Open "select zycp,bm,zw,Flag,[User] from Websen_corporation",conn,1,3 rssql("zycp")=aaa rssql.AddNew rssql.Update Rs.MoveNext Loop