我在使用 javascript 访问 webconfig 文件时遇到问题,这是我的 javascript 方面...
<script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=<%=ConfigurationManager.AppSettings["GoogleAPIKey"]%>"></script>
正在访问 webconfig 但我收到一个错误...
这是 网络配置
<add key="GoogleAPIKey" value="key api"/>
非常感谢您的帮助..
最佳答案
这是我的问题的解决方案..
<script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=<asp:Literal runat="server" ID="LitGoogle" />" ></script>
关于javascript - 在javascript src google map api中调用网络配置值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39920697/