<html>
<head>
<style>@media print{input {display:none}}</style>
</head>
<body>
<table>
<tr><th>姓名</th><th>年龄</th><th>来自何方</th></tr>
<tr><td>张三</td><td>29</td><td>北京</td></tr>
</table>
<input type=button name="print" value="print">
<input type=submit name="ok" value="确定">
</body>
</html>
<head>
<style>@media print{input {display:none}}</style>
</head>
<body>
<table>
<tr><th>姓名</th><th>年龄</th><th>来自何方</th></tr>
<tr><td>张三</td><td>29</td><td>北京</td></tr>
</table>
<input type=button name="print" value="print">
<input type=submit name="ok" value="确定">
</body>
</html>
解决方案 »
- document.write 在不同浏览器中的差异问题以及html导出excel
- 由桌面QQ界面进入到QQ空间的用户认证机制是怎样的?
- 求--学习JavaScript的步骤?
- Gridview和checkbox结合,进就有分
- 想用js访问DataGrid的单元格里的textbox~
- 实现类似VB的编辑器,有个难点望高手解答
- ******* 如何用js判断有无方法
- 如何在前面加一个图片? document.writeln(wholemessage)
- 请问搞手一个元素TD的问题?
- onchange大问题!高手请进
- 怎么样增加内容?大家帮忙啊!
- 聊天室的新数据是怎么追加上去的,(我指的是原数据不变),回答有分!!!
<head>
<style type=text/css media=print>
noprint{display:none}
</style>
</head>
<body>
<table>
<tr><th>姓名</th><th>年龄</th><th>来自何方</th></tr>
<tr><td>张三</td><td>29</td><td>北京</td></tr>
</table>
<input type=button name="print" value="print" class=noprint>
<input type=submit name="ok" value="确定" class=noprint>
</body>
</html>
当你打印的时候就不出现的了。
[email protected]
能不能发给我一份,我也需要
[email protected]
var strInner
var strCntInner
var ConnectionString
// Create the Recordset Object
rs = new ActiveXObject("ADODB.Recordset");
// Build the connection string
// ConnectionString Format below:
//ConnectionString = "DRIVER=SQL Server;SERVER=MySQLServer;CATALOG=MyDatabase;UID=USERID;PWD=Password";
// for SQL 7.0:
//ConnectionString = "DRIVER=SQL Server;SERVER=mxh;CATALOG=mxh;UID=mxh;PWD=mmm";
// for Access Database (on Server):
//ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=\\\\demwwwdev01\\develop\\im\\security\\mxh.mdb";
// for Access Database (on local drive):
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\\mxh\\mxh.mdb";
// Build a SQL statement
strSQL = "SELECT Name, Count FROM tbl ORDER BY Count DESC";
// Open the recordset
rs.Open(strSQL, ConnectionString, 3,1,1);
// Loop through the Recordset
while(!rs.EOF)
{
//以下省略
}
先看这个:
<html>
<head>
<style>@media print{input {display:none}}</style>
</head>
<body>
<table>
<tr><th>姓名</th><th>年龄</th><th>来自何方</th></tr>
<tr><td>张三</td><td>29</td><td>北京</td></tr>
</table>
<input type=button name="print" value="print">
<input type=submit name="ok" value="确定">
</body>
</html>
上边的代码的确能够在打印时屏蔽掉button按钮和submit(确定)按钮,
再看下边:
<html>
<head>
<style>@media print{input {display:none}}</style>
</head>
<body>
<table>
<tr><th>姓名</th><th>年龄</th><th>来自何方</th></tr>
<tr><td>张三</td><td>29</td><td>北京</td></tr>
<tr><td><input type=text name=city value="北京"></td></tr>
</table>
<input type=button name="print" value="print">
<input type=submit name="ok" value="确定">
</body>
</html>
这段代码<tr><td><input type=text name=city value="北京"></td></tr>的内容也同时被屏蔽掉了!这是我不希望的!!!因为它在<table></table>中。
问:如何才能只屏蔽掉button按钮和submit(确定)按钮呢???
<head>
<style>@media print{.mxh {display:none}}</style>
</head>
<body>
<table>
<tr><th>姓名</th><th>年龄</th><th>来自何方</th></tr>
<tr><td>张三</td><td>29</td><td>北京</td></tr>
<tr><td><input type=text name=city value="北京"></td></tr>
</table>
<input type=button name="print" class="mxh" value="print">
<input type=submit name="ok" class="mxh" value="确定">
</body>
</html>