以下是我在母板(masterpage.master)里中加的一段代码。我做的是一个供求信息网。想用下面的代码实现在所有页面都有一个“我要发布”的连接。但是一加上就有错误。找开masterpage.master时只能打开source面,desgin面总是打不开,说是因为页面有错/。不过还能运行。只是defual.aspx页面的这个“我要发布”连接不能用。其他页面的连接都能打开。
<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]="../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 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]="../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>
请大家帮忙。谢谢
解决方案 »
- 求ajax的用户注册代码,有注释的最好!
- 大家帮我看看后台生成的img无法显示!
- Server.MapPath 该怎么写。菜鸟请教
- AjaxPro-------指定资源下载失败!
- asp.net 向前台指定位置输出HTML
- 问个简单的问题,Activex控件可以用在asp.net中吗?
- [讨论]自动生成代码的工具,codesmith,RapidTier,codeplus等等,大家喜欢用哪个?
- 自定义控件
- asp.net面试题(触类旁通)
- 请问~~DropDownList这种效果该如何实现啊~~~
- CSDN网站首页是静态的还是动态的?
- .net 初级书 哪本好啊 ,0基础的 。。。拜托大家推荐下
据我所遇到的情况,在js中调用页面控件的id时,
要用<%= %>
例如对TextBox1进行赋值,应该写成:
document.getElementById("<%= TextBox1.ClientID %>").value = "aaaa";
<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]="../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>