首页上一页 1 下一页尾页 1 条记录 1/1页
出自ASP.NET项目开发案例全程实录(第二版) 第1章 供求信息网的代码求解
发表在ASP.NET图书答疑
2011-05-23
是否精华
是
否
版块置顶:
是
否
求问。在MasterPage.master 中这部分代码的具体用途是什么?谢谢~~~~~
母版页中布局完成,但是多出来这么一段的script 的代码。不知道具体的实现是什么???
<script language="JavaScript1.2">
function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
else {eval(document.object1.top=eval(window.pageYOffset+20));}
setTimeout("makeStatic()",0);}
</script>
<script language="JavaScript1.2">
function positionmenu(){
move(-100)
}
if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand; Position : Absolute ;Left : 100px ;Top : 120px ;100 : 120">')}
</script>
<table border="0" cellpadding="0" cellspacing="0" width="115" bgcolor="#000000">
<script language="JavaScript1.2"><!--
if (document.all||document.layers) {
makeStatic();}
var text=new Array();
var thelink=new Array();
text[0]="";
thelink[0]="<%= Request.ApplicationPath %>/infoadd.aspx";
var linktarget=''
function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}
for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=159 background=images/fabu.gif onclick="navigateie('+i+')" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL> '+text[i]+'</FONT></TD></TR>')}
else {document.write('<TR><TD background="images/fabu.gif"><ILAYER><LAYER HEIGHT="18" width=131><FONT SIZE=2 FACE=ARIAL> <A HREF="'+thelink[i]+'" target="'+linktarget+'" id="nounderline">'+text[i]+'</A></FONT></LAYER></ILAYER></TD></TR>')}
</script>
<tr>
<td bgcolor="#0099FF"><font size="1" face="Arial"> </font></td>
</TR>
</table>
<script language="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</script>
母版页中布局完成,但是多出来这么一段的script 的代码。不知道具体的实现是什么???
<script language="JavaScript1.2">
function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
else {eval(document.object1.top=eval(window.pageYOffset+20));}
setTimeout("makeStatic()",0);}
</script>
<script language="JavaScript1.2">
function positionmenu(){
move(-100)
}
if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand; Position : Absolute ;Left : 100px ;Top : 120px ;100 : 120">')}
</script>
<table border="0" cellpadding="0" cellspacing="0" width="115" bgcolor="#000000">
<script language="JavaScript1.2"><!--
if (document.all||document.layers) {
makeStatic();}
var text=new Array();
var thelink=new Array();
text[0]="";
thelink[0]="<%= Request.ApplicationPath %>/infoadd.aspx";
var linktarget=''
function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}
for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=159 background=images/fabu.gif onclick="navigateie('+i+')" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL> '+text[i]+'</FONT></TD></TR>')}
else {document.write('<TR><TD background="images/fabu.gif"><ILAYER><LAYER HEIGHT="18" width=131><FONT SIZE=2 FACE=ARIAL> <A HREF="'+thelink[i]+'" target="'+linktarget+'" id="nounderline">'+text[i]+'</A></FONT></LAYER></ILAYER></TD></TR>')}
</script>
<tr>
<td bgcolor="#0099FF"><font size="1" face="Arial"> </font></td>
</TR>
</table>
<script language="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</script>