[英]Displaying DIV from another ASPX page?
I'm developing a mapping application ( VS2008 C
#) and have my map window (Esri ADF MapControl) displayed within my main aspx. 我正在开发一个映射应用程序( VS2008 C
#),并在主aspx中显示了地图窗口(Esri ADF MapControl)。
I'm now compiling a print template with another aspx page which will display and print the current map from the main aspx. 我现在正在编译带有另一个aspx页面的打印模板,该页面将显示和打印来自主aspx的当前地图。
Normally I'd use a Frame tag to dispay the main aspx in my print template however I'm just interested in copying over the map DIV. 通常,我会使用Frame标签来消除打印模板中的主要aspx,但是我只想复制地图DIV。
You can try do it using jquery: 您可以尝试使用jquery来做到这一点:
<!DOCTYPE html>
<html>
<head>
<style>
body{ font-size: 12px; font-family: Arial; }
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<b>Footer navigation:</b>
<div id="mydiv"></div>
<script>
$("#mydiv").load("mypage.html");
</script>
</body>
</html>
Source: http://api.jquery.com/load/ 资料来源: http : //api.jquery.com/load/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.