87,901
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style>
#floater {
position: absolute;
left: 500;
top: 146;
width: 125;
visibility: visible;
z-index: 10
}
</style>
</head>
<body>
<div ID="floater" style="left: 500px; top: 158px">
<p align="center"> <img SRC="1.gif" alt="图片显示的文字" WIDTH="125" HEIGHT="60"> <br>
<font color="#FF8040">2008北京欢迎你 </font> </p>
</div>
<script>
if(document.all)
{
document.onmousedown = grabIt;
}
function grabIt(e)
{
if(document.all)
{
whichIt = event.srcElement;
alert(whichIt)
alert(whichIt.parentElement)
}
}
</script>
</body>
</html>
<head>
<style>
#floater {
position: absolute;
left: 500;
top: 146;
width: 125;
visibility: visible;
z-index: 10
}
</style>
</head>
<body>
<div ID="floater" style="left: 500px; top: 158px;border:1px solid red;">
<p align="center">
<img SRC="http://www.baidu.com/img/baidu_logo.gif" alt="图片显示的文字" WIDTH="125" HEIGHT="60"><br/>
<font color="#FF8040">2008北京欢迎你 </font>
</p>
</div>
<font color="#FF8040">2008北京欢迎你 </font>
<script>
if(document.all)
{
document.onmousedown = grabIt;
}
function grabIt(e)
{
if(document.all)
{
whichIt = event.srcElement;
alert(whichIt.innerHTML)
alert(whichIt.parentElement.innerHTML)
}
}
</script>
</body>
<head>
<style>
#floater {
position: absolute;
left: 500;
top: 146;
width: 125;
visibility: visible;
z-index: 10
}
</style>
</head>
<body id="body1">
<div ID="floater" style="left: 500px; top: 158px">
<p id="p1" align="center"> <img id="img1" SRC="1.gif" alt="图片显示的文字" WIDTH="125" HEIGHT="60"> <br>
<font color="#FF8040">2008北京欢迎你 </font> </p>
</div>
<script>
if(document.all)
{
document.onmousedown = grabIt;
}
function grabIt(e)
{
if(document.all)
{
whichIt = event.srcElement;
alert(whichIt.id);
alert(whichIt.parentElement.id);
}
}
</script>
</body>
page1
page2
//设置打印 <script language=javascript> function window.onload() { // -- advanced features factory.printing.SetMarginMeasure(2) // measure margins in inches factory.printing.SetPageRange(false, 1, 3) // need pages from 1 to 3 factory.printing.printer = "HP DeskJet 870C" factory.printing.copies = 2 factory.printing.collate = true factory.printing.paperSize = "A4" factory.printing.paperSource = "Manual feed" // -- basic features factory.printing.header = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页" factory.printing.footer = "(自定义页脚)" factory.printing.portrait = false factory.printing.leftMargin = 0.75 factory.printing.topMargin = 1.5 factory.printing.rightMargin = 0.75 factory.printing.bottomMargin = 1.5 } function Print(frame) { factory.printing.Print(true, frame) // print with prompt }