高手接招 取本页面的代码??你要是这个? document.body.innerHTML 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 呵呵,是啊,用innerHTML或outerHTML 如何动态添加,我试了,不能输出menu,它到了下一页。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""></HEAD><BODY><style type="text/css"><!--.t { filter: Alpha(Opacity=50)}td { font-size: 12px; line-height: 22px}a:link { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}a:visited { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}a:hover { background-color: #FF66FF; height: 20px; width: 61px; border: #FFFFFF; border-style: dotted; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}--></style><table border = 1><tr id = "asd" oncontextmenu="window.event.returnValue=false;show_div();"><td>asdf</td></tr><tr id = "dfgdf" oncontextmenu="window.event.returnValue=false;show_div()"><td>asdfsd</td></tr></table><SCRIPT language=javascript>function show_div(){ var str = ""; str += "<div id=Layer2 style=\"display:'none'\">"; str += "<table width=100% border=0 cellspacing=0 cellpadding=0 height=100%><tr>"; str += "<td align=center valign=top><font color=#FFFFFF >订餐<br>"; str += "<a href=aomen.aspx target=mainFrame>澳门街订餐</a><br>"; str += "<a href=right.aspx target=mainFrame>普通订餐</a><br>"; str += "<a href=\"#;\">第三项</a><br></font></td></tr></table></div>"; document.writeln( str ); document.all.Layer2.style.display = '';}</SCRIPT></BODY></HTML> 这样试试<BODY><style type="text/css"><!--.t { filter: Alpha(Opacity=50)}td { font-size: 12px; line-height: 22px}a:link { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}a:visited { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}a:hover { background-color: #FF66FF; height: 20px; width: 61px; border: #FFFFFF; border-style: dotted; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}--></style><table border = 1><tr><td id = "asd" oncontextmenu="window.event.returnValue=false;show_div(this);">asdf</td></tr><tr><td id = "dfgdf" oncontextmenu="window.event.returnValue=false;show_div(this)">asdfsd</td></tr></table><SCRIPT language=javascript>function show_div(obj){ var str = ""; str += "<div id=Layer2>"; str += "<table width=100% border=0 cellspacing=0 cellpadding=0 height=100%><tr>"; str += "<td align=center valign=top><font color=#FFFFFF >订餐<br>"; str += "<a href=aomen.aspx target=mainFrame>澳门街订餐</a><br>"; str += "<a href=right.aspx target=mainFrame>普通订餐</a><br>"; str += "<a href=\"#;\">第三项</a><br></font></td></tr></table></div>"; obj.innerHTML += str; //如果只想出现 menu 的话, 直接用 obj.innerHTML = str; 就行了}</SCRIPT></BODY> 求教高人:鼠标不动的情况下怎么执行onmouseover里的函数 这个正则的意思是? 谁有类似这样的网页播放器 为什么iframe中无法执行print()方法 请问jiathis的代码与jquery有冲突,应该怎么解决?急!!! javascript在firefox,IE下的兼容写法 js 中怎么让input输入框选中部分内容 急救!如何用js控制include file的内容 鼠标的滚轴控制滚动条滚动 求教用js怎么遍历记取这样的json数据 不用数组能不能在javascript里引用有规则表单对象名 (急救) ----onkeypress事件-----
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<style type="text/css">
<!--
.t { filter: Alpha(Opacity=50)}
td { font-size: 12px; line-height: 22px}
a:link { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
a:visited { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
a:hover { background-color: #FF66FF; height: 20px; width: 61px; border: #FFFFFF; border-style: dotted; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
-->
</style>
<table border = 1>
<tr id = "asd" oncontextmenu="window.event.returnValue=false;show_div();"><td>asdf</td></tr>
<tr id = "dfgdf" oncontextmenu="window.event.returnValue=false;show_div()"><td>asdfsd</td></tr>
</table><SCRIPT language=javascript>
function show_div()
{
var str = "";
str += "<div id=Layer2 style=\"display:'none'\">";
str += "<table width=100% border=0 cellspacing=0 cellpadding=0 height=100%><tr>";
str += "<td align=center valign=top><font color=#FFFFFF >订餐<br>";
str += "<a href=aomen.aspx target=mainFrame>澳门街订餐</a><br>";
str += "<a href=right.aspx target=mainFrame>普通订餐</a><br>";
str += "<a href=\"#;\">第三项</a><br></font></td></tr></table></div>";
document.writeln( str );
document.all.Layer2.style.display = '';
}
</SCRIPT>
</BODY>
</HTML>
<BODY>
<style type="text/css">
<!--
.t { filter: Alpha(Opacity=50)}
td { font-size: 12px; line-height: 22px}
a:link { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
a:visited { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
a:hover { background-color: #FF66FF; height: 20px; width: 61px; border: #FFFFFF; border-style: dotted; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
-->
</style>
<table border = 1>
<tr><td id = "asd" oncontextmenu="window.event.returnValue=false;show_div(this);">asdf</td></tr>
<tr><td id = "dfgdf" oncontextmenu="window.event.returnValue=false;show_div(this)">asdfsd</td></tr>
</table><SCRIPT language=javascript>
function show_div(obj)
{
var str = "";
str += "<div id=Layer2>";
str += "<table width=100% border=0 cellspacing=0 cellpadding=0 height=100%><tr>";
str += "<td align=center valign=top><font color=#FFFFFF >订餐<br>";
str += "<a href=aomen.aspx target=mainFrame>澳门街订餐</a><br>";
str += "<a href=right.aspx target=mainFrame>普通订餐</a><br>";
str += "<a href=\"#;\">第三项</a><br></font></td></tr></table></div>";
obj.innerHTML += str; //如果只想出现 menu 的话, 直接用 obj.innerHTML = str; 就行了
}
</SCRIPT>
</BODY>