如何通过选择A页面的下拉菜单实现B页面datagrid的显示和跳转? 同题,A,B页面在一个框架页内.下拉菜单是绑定的,原来是在同一个页面里的,后来为了要打印,不想显示这些部分,所以要挪开.另外,我设计的datagrid里,编辑栏一开始是不能看到的,需要选择编辑后才显示,这种功能,也要按我题目里的要求来实现的话(也就是同在A页面里控制),应怎么去做呢?谢谢.或者,有什么办法能在打印时把自己不要的东西隐藏起来呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <HTML><HEAD> <TITLE>web打印去掉页眉页脚,以及不想打印出的页面元素</TITLE> <META http-equiv=Content-Type content="text/html; charset=gb2312"> <SCRIPT language=javascript> function printpr() //预览函数 { document.all("qingkongyema").click();//打印之前去掉页眉,页脚 document.all("dayinDiv").style.display="none"; //打印之前先隐藏不想打印输出的元素(此例中隐藏“打印”和“打印预览”两个按钮) var OLECMDID = 7; var PROMPT = 1; var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; document.body.insertAdjacentHTML('beforeEnd', WebBrowser); WebBrowser1.ExecWB(OLECMDID, PROMPT); WebBrowser1.outerHTML = ""; document.all("dayinDiv").style.display="";//打印之后将该元素显示出来(显示出“打印”和“打印预览”两个按钮,方便别人下次打印) } function printTure() //打印函数 { document.all('qingkongyema').click();//同上 document.all("dayinDiv").style.display="none";//同上 window.print(); document.all("dayinDiv").style.display=""; } function doPage() { layLoading.style.display = "none";//同上 } </SCRIPT> <script language="VBScript"> dim hkey_root,hkey_path,hkey_key hkey_root="HKEY_CURRENT_USER" hkey_path="\Software\Microsoft\Internet Explorer\PageSetup" '//设置网页打印的页眉页脚为空 function pagesetup_null() on error resume next Set RegWsh = CreateObject("WScript.Shell") hkey_key="\header" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"" hkey_key="\footer" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"" end function '//设置网页打印的页眉页脚为默认值 function pagesetup_default() on error resume next Set RegWsh = CreateObject("WScript.Shell") hkey_key="\header" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P" hkey_key="\footer" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&u&b&d" end function </script> </HEAD> <BODY background="images/background_01.gif" leftMargin=0 topMargin=0 rightMargin=0 bottomMargin=0 style="BACKGROUND-POSITION: center 50%"> <DIV align=center> 你希望打印的内容.......... </DIV> <DIV align="center" id="dayinDiv" name="dayinDiv"><input type="button" class="tab" value="打印" onclick="printTure();"> <input type="button" class="tab" value="打印预览" onclick="printpr();"> <input type="hidden" name="qingkongyema" id="qingkongyema" class="tab" value="清空页码" onclick="pagesetup_null()"> <input type="hidden" class="tab" value="恢复页码" onclick="pagesetup_default()"> </DIV> </BODY> </HTML> 求代码,有关C#winform树控件的 拖拽下载的问题 高分相送 关于windows mobile环境搭建的两种方法?? 关于ACCESS备份还原的问题。 C#命名管道中int型数组和字符数组的转换问题 为什么Session失去的时候有时候会出现错误 c1FlexGrid托拽问题 查询问题 高手请进 请帮忙解决一下很基本的问题,急,ths DataRelation两个表,关键字是两个字段该怎么写这句话??? 在C#使用XML注释,如何使用呀?
<HEAD>
<TITLE>web打印去掉页眉页脚,以及不想打印出的页面元素</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=javascript>
function printpr() //预览函数
{
document.all("qingkongyema").click();//打印之前去掉页眉,页脚
document.all("dayinDiv").style.display="none";
//打印之前先隐藏不想打印输出的元素(此例中隐藏“打印”和“打印预览”两个按钮)
var OLECMDID = 7;
var PROMPT = 1;
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
document.all("dayinDiv").style.display="";//打印之后将该元素显示出来(显示出“打印”和“打印预览”两个按钮,方便别人下次打印)
}
function printTure() //打印函数
{
document.all('qingkongyema').click();//同上
document.all("dayinDiv").style.display="none";//同上
window.print();
document.all("dayinDiv").style.display="";
}
function doPage()
{
layLoading.style.display = "none";//同上
}
</SCRIPT>
<script language="VBScript">
dim hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
'//设置网页打印的页眉页脚为空
function pagesetup_null()
on error resume next
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\header"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
hkey_key="\footer"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
end function
'//设置网页打印的页眉页脚为默认值
function pagesetup_default()
on error resume next
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\header"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P"
hkey_key="\footer"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&u&b&d"
end function
</script>
</HEAD>
<BODY background="images/background_01.gif" leftMargin=0
topMargin=0 rightMargin=0 bottomMargin=0 style="BACKGROUND-POSITION:
center 50%">
<DIV align=center>
你希望打印的内容..........
</DIV>
<DIV align="center" id="dayinDiv" name="dayinDiv"><input
type="button" class="tab" value="打印"
onclick="printTure();">
<input type="button" class="tab" value="打印预览" onclick="printpr();">
<input type="hidden" name="qingkongyema" id="qingkongyema"
class="tab" value="清空页码" onclick="pagesetup_null()">
<input type="hidden" class="tab" value="恢复页码"
onclick="pagesetup_default()">
</DIV>
</BODY>
</HTML>