那位帅哥来救命呀~~~~有美女相送的还有1000分,很划的来的!!

zhangzuochang 2003-08-19 11:34:25
用户地图窗口内容打印!!
还有是多媒体地图(图片)打印!!
用户地图窗口内容另存为图片!!!
最好能提供源代码!!


现在我主要是需要:如何操作子窗口,如何保存图片文件!!预览,设置呀?
下面是我的代码:<head><style>
.BorderOn {BORDER-RIGHT: #456789 1px solid; BORDER-TOP: #456789 1px solid; MARGIN-LEFT: 10px; BORDER-LEFT: #456789 1px solid; WIDTH: 90px; BORDER-BOTTOM: #456789 1px solid}
.BorderOff {BORDER-RIGHT: #444444 1px solid; BORDER-TOP: #444444 1px solid; MARGIN-LEFT: 0px; BORDER-LEFT: #444444 1px solid; WIDTH: 90px; BORDER-BOTTOM: #444444 1px solid}
A.mBlue:link {COLOR: #0000ff; TEXT-DECORATION: none}
A.mBlue:visited {COLOR: #0000ff; TEXT-DECORATION: none}
A.mBlue:active {COLOR: #ff0000; TEXT-DECORATION: none}
A.mBlue:hover {COLOR: #ff0000; TEXT-DECORATION: underline}
td { font-size: 9pt; font-family: "宋体"}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="MAIN.CSS" type="text/css">

<script language="JavaScript1.2">
var nInitWidth;
var nInitHeight;
var bZoom= false;

<!---->

function myPrint(){
document.all.item("print").style.visibility="hidden";
window.print("_paren");
document.all.item("print").style.visibility="visible";
}

function PageSetup()
{ WB.ExecWB(8,1); }

function Preview()
{ WB.ExecWB(7,1); }

function Savewin()
{ WB.ExecWB(4,1); }

//图像放大
function zoomIn(){
if (bZoom==false){
nInitWidth=parent.picWin.document.images['picName'].width;
nInitHeight=parent.picWin.document.images['picName'].height
bZoom=true;
}
var nWidth = parent.picWin.document.images['picName'].width*1.2;
var nHeight= parent.picWin.document.images['picName'].height*1.2;
//if (nWidth>=nInitWidth){
//document.images['picName'].width = nInitWidth;
//}
//else{
parent.picWin.document.images['picName'].width = nWidth;
//}
//if (nHeight>=nInitHeight){
//document.images['picName'].height = nInitHeight;
//}
//else{
parent.picWin.document.images['picName'].height = nHeight;
//}

}

//图像缩小
function zoomOut(){

if (bZoom==false){
nInitWidth=parent.picWin.document.images['picName'].width;
nInitHeight=parent.picWin.document.images['picName'].height

bZoom=true;
}
var nWidth = parent.picWin.document.images['picName'].width*0.8;
var nHeight=parent.picWin.document.images['picName'].height*0.8;
parent.picWin.document.images['picName'].width = nWidth;
parent.picWin.document.images['picName'].height = nHeight;

}

//恢复大小
function Restore(){
if (bZoom==true){
parent.picWin.document.images['picName'].width = nInitWidth;
parent.picWin.document.images['picName'].height = nInitHeight;
}
}

function closeWin()
{ window.close(); }

offMessage = "移动鼠标到上面的菜单可以看到它的详细介绍。"<!---->
function boxOn(which,message) {
if (document.all||document.getElementById) {
which.className = 'BorderOn';
if (document.getElementById) {
document.getElementById("Message").innerHTML = message
}
else {
Message.innerHTML = message;
}
}
}
<!-- 此特效使用《网页特效精灵》编辑制作-->
<!-- 奥天软件:http://www.aosky.net-->
function boxOff(which) {
if (document.all||document.getElementById) {
which.className = 'BorderOff';
if (document.getElementById) {
document.getElementById("Message").innerHTML = offMessage
}
else {
Message.innerHTML = offMessage;
}
}
}
</script>
<link rel="stylesheet" href="MAIN.CSS" type="text/css">
</head>
<body>

<table cellSpacing="0" cellPadding="0" width="400">
<!--
<TBODY>
<tr>
<td align="middle"><table class="BorderOff" cellSpacing="0" cellPadding="6" bgColor="#FFCC66">
<TBODY>
<tr>
<td><p align="center">导航菜单</td>
</tr>
</TBODY>
-->
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WB width=0>
<embed height="0" width="0">
</embed>
</OBJECT>
<div id="print" style="position: absolute; top: 500; left: 1; width: 500; visibility: hidden; background-color: #F0F0F0; height: 50"><!--<nobr>-->

<td bgcolor="#CACAFF" align="center"><a class="mBlue" href="#" onclic="window.print("_paren")" style="Cursor:hand">打印本页</a></td>
<td bgcolor="##99cc33" align="center"><a class="mBlue" href="#" onclick="PageSetup()" style="Cursor:hand">页面设置</a></td>
<td bgcolor="#ffcc00" align="center"><a class="mBlue" href="#" onclick="Preview()" style="Cursor:hand">打印预览</a></td>
<td bgcolor="#D7AEAE" align="center"><a class="mBlue" href="#" onclick="Savewin()" style="Cursor:hand">保存文件</a></td>
<td bgcolor="#ffcc00" align="center"><a class="mBlue" href="#" onclick="zoomIn()" style="Cursor:hand">图像放大</a></td>
<td bgcolor="#D7AEAE" align="center"><a class="mBlue" href="#" onclick="zoomOut()" style="Cursor:hand">图像缩小</a></td>
<td bgcolor="#00CCCCF" align="center"><a class="mBlue" href="#" onclick="Restore()" style="Cursor:hand">恢复原图</a></td>
<td bgcolor="#00CCCCF" align="center"><a class="mBlue" href="#" onclick="closeWin()" style="Cursor:hand">关闭窗口</a></td>
</div>
</table>

</body>
如何操作子窗口呢??下面是我得自窗口代码:
<%
String strPicName = request.getParameter("picName");
String strPicTitle = request.getParameter("picTitle");
%>
<html>
<head>
<title><%=strPicTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../MAIN.CSS" type="text/css">

<script language="javascript">
var nInitWidth;
var nInitHeight;
var bZoom= false;

//图像放大
function zoomIn(){
if (bZoom==false){
nInitWidth=document.images['picName'].width;
nInitHeight=document.images['picName'].height
bZoom=true;
}
var nWidth = document.images['picName'].width*1.2;
var nHeight=document.images['picName'].height*1.2;
//if (nWidth>=nInitWidth){
//document.images['picName'].width = nInitWidth;
//}
//else{
document.images['picName'].width = nWidth;
//}
//if (nHeight>=nInitHeight){
//document.images['picName'].height = nInitHeight;
//}
//else{
document.images['picName'].height = nHeight;
//}

}

//图像缩小
function zoomOut(){

if (bZoom==false){
nInitWidth=document.images['picName'].width;
nInitHeight=document.images['picName'].height

bZoom=true;
}
var nWidth = document.images['picName'].width*0.8;
var nHeight=document.images['picName'].height*0.8;
document.images['picName'].width = nWidth;
document.images['picName'].height = nHeight;

}

//恢复大小
function Restore(){
if (bZoom==true){
document.images['picName'].width = nInitWidth;
document.images['picName'].height = nInitHeight;
}



}

//关闭窗口
function closeWin(){
window.close()
}

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--<iframe name="toolbarFrame" WIDTH=100% height=26px astyle="HEIGHT: 20px; LEFT: 1px;top:90px; POSITION: absolute; WIDTH: 506px" noResize src="toolbar.htm" scrolling=no frameborder=0 framespacing=0 id="toolbarFrame" ></iframe>-->
<!--<table>
<tr>
<td><input type="button" name="Submit" value="图像放大" onclick="zoomIn()"></td>
<td><input type="button" name="zoomout" value="图像缩小" onclick="zoomOut()"></td>
<td><input type="button" name="zoomout" value="恢复原图" onclick="Restore()"></td>
<td><input type="button" name="zoomout" value="关闭窗口" onclick="closeWin()"></td>
</tr>
</table>-->
<table>
<tr>
<td>
<div align="center"><img name="picName" src='<%=strPicName%>' border=0></div>

</td>
</tr>
</table>

</body>
</html>

...全文
34 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zqs10597259 2003-09-28
  • 打赏
  • 举报
回复
我来了,发给你了
conning333 2003-08-19
  • 打赏
  • 举报
回复
hoho,美女在哪里??
iamsoloist 2003-08-19
  • 打赏
  • 举报
回复
:)
Sundery 2003-08-19
  • 打赏
  • 举报
回复
给分的方法在这里:
http://www.csdn.net/help/over.asp

楼主用我做实验吧:)给我点分,你也好学习怎么给分:)
hxy1982 2003-08-19
  • 打赏
  • 举报
回复
gz
zhangzuochang 2003-08-19
  • 打赏
  • 举报
回复
还有如何给分呀???:)
我~~~
abczy 2003-08-19
  • 打赏
  • 举报
回复
1000分就算了,把美女请出来先!要是从侏罗纪来的给10000分也没人吊你

81,090

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧