Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/409.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone URL方案弄乱了我的Javascript_Javascript_Iphone_Url Scheme - Fatal编程技术网

iPhone URL方案弄乱了我的Javascript

iPhone URL方案弄乱了我的Javascript,javascript,iphone,url-scheme,Javascript,Iphone,Url Scheme,我正在尝试为iPhone开发一个基于web的应用程序。一切都很完美(在浏览器中测试),但是,当我采取以下措施时: function goToLocation() { latitude = document.getElementById("<%=txtLatitude.ClientID%>").innerHTML; longitude = document.getElementById("<%=txtLongitude.ClientID%>").innerH

我正在尝试为iPhone开发一个基于web的应用程序。一切都很完美(在浏览器中测试),但是,当我采取以下措施时:

function goToLocation() {
    latitude = document.getElementById("<%=txtLatitude.ClientID%>").innerHTML;
    longitude = document.getElementById("<%=txtLongitude.ClientID%>").innerHTML;
    window.parent.location = 'http://maps.google.com/maps?q='latitude + ',' +
    longitude + '&z=14';
}
函数goToLocation(){
纬度=document.getElementById(“”).innerHTML;
经度=document.getElementById(“”).innerHTML;
window.parent.location=http://maps.google.com/maps?q='纬度+','+
经度+'&z=14';
}
与我的aspx混合:

    <tr><td>Latitude: </td>
        <td><asp:Label ID="txtLatitude" runat="server"></asp:Label></td>
    </tr>
    <tr><td>Longitude: </td>
        <td><asp:Label ID="txtLongitude" runat="server"></asp:Label></td>
    </tr>
纬度:
,
其中11.111是我的纬度,22.222是我的经度

当我使用我的电脑浏览器时,它会显示它应该显示的内容,如

所以,我想我的问题是:有没有办法告诉iphone不要在“tel”前面加上前缀呢?或者,我想我可以通过告诉javascript从一个数字开始(我可以自己查找)。但同时,我不喜欢把纬度和经度作为手机的链接

谢谢

瞧,相信我。以后你可以用我的名字给你未来的儿子起名:)
http://maps.google.com/maps?q=<a href="tel:11.111">11.111</a>,<a href="tel:22.222">22.222</a>