|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
菜鳥求助!急!
下面的代碼是網頁兩邊廣告的,直接運行沒有任何問題,放入網頁中卻出現如下問題!
Microsoft VBScript 編譯器錯誤 錯誤 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Active Server Pages 錯誤 'ASP 0138'
嵌套的 Script 塊
/index1.asp,行829
Script 塊不能放在另一個 Script 塊內。
<Script language="JavaScript">
var rightbar;
var coupletcode;
rightbar = window.screen.width-140;
coupletcode = "<DIV id=sidebar style='LEFT: 0px; POSITION: absolute; TOP: 100px; VISIBILITY: hidden;' width=117>32</div><DIV id=sidebar2 style='LEFT: " + rightbar + "px; POSITION: absolute; TOP: 100px; VISIBILITY: hidden' width=117>32</div>";
if (window.screen.width>=1024)
{
document.write(coupletcode);
}
function InsertCouplet()
{
if (window.screen.width>=1024){
document.all.sidebar.style.visibility = "visible";
document.all.sidebar2.style.visibility = "visible";
document.all.sidebar.innerHTML = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=117 HEIGHT=270 id=leftFF ALIGN=> <PARAM NAME=movie VALUE=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian> <PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent> <EMBED id=leftFFG src=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian quality=high wmode=transparent WIDTH=117 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
document.all.sidebar2.innerHTML = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=117 HEIGHT=270 id=youFF ALIGN=> <PARAM NAME=movie VALUE=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent><EMBED id=youFFG src=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian quality=high wmode=transparent WIDTH=117 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
}
}
InsertCouplet();
function leftFFG_DoFSCommand(command,args){
if ((command == "SohuCLFS")&&(args =="hidecouplet")){
document.all.sidebar.style.visibility = "hidden";
document.all.sidebar2.style.visibility = "hidden";
}
}
function youFFG_DoFSCommand(command,args){
leftFFG_DoFSCommand(command,args);
}
<!--
if (document.all){
document.write("<Script language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n");
document.write(" leftFFG_DoFSCommand(command,args);\n");
document.write("</Script>\n");
document.write("<Script language=\"JavaScript\" For=\"leftFF\" Event=\"FSCommand(command,args)\">\n");
document.write(" leftFFG_DoFSCommand(command,args);\n");
document.write("</Script>\n");
}
//-->
</script>
註:第行829 就是document.write("<Script language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n"); |
我放在<body></body>之間或者<html></html>之外都不可以!高手解答啊!
———————————————————————————————————————————————————————————————————————————————
我是喜歡漫步的魚!QQ:46531717,歡迎所有喜歡網頁製作和經驗交流的朋友加我! |
或者高手給個好用的代碼!
謝謝了! |
怎麼沒有人理我啊?俺可是慕名而來的啊!
|
參見:
http://bbs.blueidea.com/viewthread.php?tid=1740001 |
不好意思,我用的就是那個代碼!還有沒有更正宗的代碼了?
|
我想知道這個問題是什麼意思?為什麼直接用沒有這個錯誤,而放到網頁中就出現這種錯誤!是代碼有問題嗎?
Microsoft VBScript 編譯器錯誤 錯誤 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Active Server Pages 錯誤 'ASP 0138'
嵌套的 Script 塊
/index1.asp,行829
Script 塊不能放在另一個 Script 塊內。
註:行829 就是document.write("<Script language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n"; |
斑竹們給解決一下了,有沒有高手自己試驗一下,到底好不好用啊!
|
俺可是一直在線等啊?有沒有人理我? |
乾脆你先用這個flash吧!
[html]
<Script language="JavaScript">
var rightbar;
var coupletcode;
rightbar = window.screen.width-140;
coupletcode = "<DIV id=sidebar style='LEFT: 0px; POSITION: absolute; TOP: 100px; VISIBILITY: hidden;' width=117>32</div><DIV id=sidebar2 style='LEFT: " + rightbar + "px; POSITION: absolute; TOP: 100px; VISIBILITY: hidden' width=117>32</div>";
if (window.screen.width>=1024)
{
document.write(coupletcode);
}
function InsertCouplet()
{
if (window.screen.width>=1024){
document.all.sidebar.style.visibility = "visible";
document.all.sidebar2.style.visibility = "visible";
document.all.sidebar.innerHTML = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=117 HEIGHT=270 id=leftFF ALIGN=> <PARAM NAME=movie VALUE=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian> <PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent> <EMBED id=leftFFG src=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian quality=high wmode=transparent WIDTH=117 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
document.all.sidebar2.innerHTML = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=117 HEIGHT=270 id=youFF ALIGN=> <PARAM NAME=movie VALUE=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent><EMBED id=youFFG src=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian quality=high wmode=transparent WIDTH=117 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
}
}
InsertCouplet();
function leftFFG_DoFSCommand(command,args){
if ((command == "SohuCLFS")&&(args =="hidecouplet")){
document.all.sidebar.style.visibility = "hidden";
document.all.sidebar2.style.visibility = "hidden";
}
}
function youFFG_DoFSCommand(command,args){
leftFFG_DoFSCommand(command,args);
}
<!--
if (document.all){
document.write("<Script language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n");
document.write(" leftFFG_DoFSCommand(command,args);\n");
document.write("</Script>\n");
document.write("<Script language=\"JavaScript\" For=\"leftFF\" Event=\"FSCommand(command,args)\">\n");
document.write(" leftFFG_DoFSCommand(command,args);\n");
document.write("</Script>\n");
}
//-->
</script>
[/html] |
這個應該是那個原裝的對聯式層廣告:
[html]
<html>
<body>
<script language="JavaScript">
var delta=0.15
var collection;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval('play()',10);
}
}
function play()
{
if(screen.width<=800)
{
for(var i=0;i<collection.length;i++)
{
collection[i].object.style.display = 'none';
}
return;
}
for(var i=0;i<collection.length;i++)
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
var theFloaters = new floaters();
theFloaters.addItem('followDiv1','document.body.clientWidth-106',80,'<br><a href=http://www.flash8.net target=_blank><img src=http://zlzx.8u8.com/cul8.gif border=0></a>');
theFloaters.addItem('followDiv2',6,80,'<br><a href=http://www.flash8.net target=_blank><img src=http://zlzx.8u8.com/cul8.gif border=0></a>');
theFloaters.play();
</script>
[/html] |
謝謝大蝦們!
|
俺就是把那個原裝的放進去一樣會有那個錯誤提示! |
marvellous
你的第二個代碼我也有
可是那個是gif圖片的啊!
真是鬱悶死了!
老闆非要我做個兩邊的Flash廣告!!
高手救急啊! |
將<html>前面這段代碼刪掉:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
清除一下你的緩存。 |
marvellous
不好意思!我<html>前沒有那個代碼!
http://www.bigchinagp.com/index1.asp
這個是主頁!你幫我看看好嗎?
|
把你的主頁分別加上我的兩個對聯式廣告都可顯示。不知道是否你的機器配置低還是不兼容什麼的?我沒招兒啦!請教大蝦吧! |
哦!
對聯式Gif圖片的我這也可以!
我是說那個Flash的對聯廣告不可以,顯示錯誤!
|
是不是路徑不對呀
我兩個都試了,都行的,是不是你IE版本太低了
我這是IE6.0,你升級一下IE再試試。
|
謝謝了!
大蝦們!
俺以後一定經常來,全力頂∼∼∼∼∼
^_^ |
又學到了一招。呵呵…… |
|