| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1031 人关注过本帖
标题:[求助]'marquees' 未定义错误 请求帮助
只看楼主 加入收藏
boofox
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-11-20
收藏
 问题点数:0 回复次数:1 
[求助]'marquees' 未定义错误 请求帮助

全部代码如下,我还不太会asp,请会的兄弟们帮助一下



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>QQ面板</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #000000;
line-height:150%;
}
body {
background:url(http://mat1.qq.com/fm/images/dg/bbg.gif) no-repeat left top;
margin:10px 0 0 12px;
background-image: url();
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #999999;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
.cwhite{color:white}
.c1{color:#FF7100}
a.lc2:link,a.lc2:visited {color:#595959;text-decoration:underline}
a.lc2:hover{text-decoration:none}
a.click1:link,a.click1:visited,a.click1:hover{font-weight:bold;}
a.click0:link,a.click0:visited,a.click0:hover{text-decoration:none}
a.click0:hover{text-decoration:underline}
#sbox{
margin:3px auto;
width:183px;
border:1px solid #595959;
padding:1px;
color:white;
}
#sbox td{color:white;}
#sbox a{color:white;}
#songList{margin:4px auto;}

.l1{border-bottom:1px solid #FE9101}
.l2{border-bottom:1px solid #FFB300}
.list{padding:3px;border:1px solid #D9D9D9;background:#fff;}
.inp{border:1px solid #BBB;width:83px;height:16px;}
.int{width:164px;height:47px;border:0;font-size:12px;line-height:150%}
.cu{cursor:pointer}
.dot{background:url(http://mat1.qq.com/fm/images/dg/b_dot.gif) repeat-x bottom}
.mylist{background:#fff;border-left:1px solid #CCC;border-right:1px solid #CCC;}
-->
</style></head>

<body>
<script language="JavaScript">
function qqping_url_build()
{
p=window.top.document.URL.indexOf("?");
if(-1==p)p=window.top.document.URL.indexOf("&");
if(-1==p)address="u="+window.top.document.URL;
else address="u="+window.top.document.URL.substring(0,p);
p=document.referrer.indexOf("?");
if(-1==p)p=window.top.document.referrer.indexOf("&");
if(-1==p)refer="r="+window.top.document.referrer;
else refer="r="+window.top.document.referrer.substring(0,p);
return address+"&"+refer;
}
document.write("<div style='position:absolute; left:0px; top:0px; width:0px; height:0px; z-index:0; visibility: hidden;'><img src='http://ping.qq.com/ping?" + qqping_url_build() + "' height='0' width='0'></div>");
</script>
<iframe name="hf" width=0 height=0></iframe>
<table width="193" height="85" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="37"><a href="http://fm.qq.com" target="_blank"><img src="http://img1.qq.com/fm/pics/3572/3572477.gif" width="193" height="37" border="0" /></a></td>
</tr>
<tr>
<td height="36" align="center" background="http://mat1.qq.com/fm/images/dg/b_a1.gif" class="cwhite"><span id="show">您正在收听-综艺之声
</span></td>
</tr>
<tr>
<td><img src="http://mat1.qq.com/fm/images/dg/b_a2.gif" width="193" height="12" /></td>
</tr>
</table>
<table width="193" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="64" align="center" valign="bottom" background="http://mat1.qq.com/fm/images/dg/b_b1.gif" class="cwhite">选台收听</td>
<td width="10"><img src="http://mat1.qq.com/fm/images/dg/b_b2.gif" width="10" height="30" /></td>
<td width="21" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bplay0.gif" width="21" height="30" onclick="plays()" alt="开始播放" /></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bstop0.gif" width="22" height="30" onclick="stop()" alt="停止播放" /></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bmute0.gif" id="muteimg" width="22" height="30" onclick="mute()" alt="静音控制"/></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bvup.gif" width="22" height="30" onclick="vup()" alt="增大音量"/></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bvdown.gif" width="22" height="30" onclick="vdown()" alt="减小音量"/></td>
<td width="10"><img src="http://mat1.qq.com/fm/images/dg/b_b3.gif" width="10" height="30" /></td>
</tr>
<tr>
<td height="7" colspan="8" bgcolor="#3F3F3F"></td>
</tr>
</table>
<table width="193" border="0" cellpadding="0" cellspacing="0" bgcolor="#3F3F3F">
<tr>
<td><div id="sbox">
<table width="183" border="0" cellpadding="0" cellspacing="0" background="http://mat1.qq.com/fm/images/dg/b_cbg.gif">
<tr>
<td width="22" height="25" align="center" class="l1"><img src="http://mat1.qq.com/fm/images/dg/b_c2.gif" width="8" height="7" /></td>
<td width="86" class="l1"><a href="#" onclick="p(1)">综艺之声</a></td>
<td width="42" align="center" class="l1">[<a href="#" onclick="p(1)">收听</a>]</td>
<td width="33" class="l1"><a href="#" onclick="p(1)"><img src="http://mat1.qq.com/fm/images/dg/b_cring.gif" width="28" height="10" border="0" /></a></td>
</tr>
<tr class="l2">
<td height="25" align="center" class="l2"><img src="http://mat1.qq.com/fm/images/dg/b_c2.gif" width="8" height="7" /></td>
<td class="l2"><a href="#" onclick="p(2)">音乐休闲</a></td>
<td align="center" class="l2">[<a href="#" onclick="p(2)">收听</a>]</td>
<td class="l2"><a href="#" onclick="p(2)"><img src="http://mat1.qq.com/fm/images/dg/b_cring.gif" width="28" height="10" border="0" /></a></td>
</tr>
<tr>
<td height="25" align="center"><img src="http://mat1.qq.com/fm/images/dg/b_c2.gif" width="8" height="7" /></td>
<td><a href="#" onclick="p(3)">我的娱乐</a></td>
<td align="center">[<a href="#" onclick="p(3)">收听</a>]</td>
<td><a href="#" onclick="p(3)"><img src="http://mat1.qq.com/fm/images/dg/b_cring.gif" width="28" height="10" border="0" /></a></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td><img src="http://mat1.qq.com/fm/images/dg/b_c1.gif" width="193" height="10" /></td>
</tr>
</table>
<table width="193" height="71" border="0" cellpadding="0" cellspacing="0" background="http://mat1.qq.com/fm/images/dg/b_d7.gif">

</table>
<table width="193" border="0" cellpadding="0" cellspacing="0" background="http://mat1.qq.com/fm/images/dg/b_e2.gif" style="margin-top:4px;">
<tr>

</tr>
</table>
<div style="display:none">
<object id="media" classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' width=0 height=0 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading Microsoft? Windows Media? Player components... type=application/x-oleobject>
<param name='URL' value='http://qr.fm.qq.com/qqradio?qqpanel'>
<param name='UIMode' value='full'>
<param name='AutoStart' value='true'>
<param name='Enabled' value='true'>
<param name='enableContextMenu' value='false'>
<param name="DisplayBackColor" value="100">
<param name="DisplayForeColor" value="100">

<param name='WindowlessVideo' value='true'>
</object>
<script language="javascript">var url="http://qr.fm.qq.com/qqradio?qqpanel";</script>
<script>
function E(obj){return document.getElementById(""+obj+"")}
var now=0;
var info=new Array();
info[0]=new Array("综艺之声","http://qr.fm.qq.com/qqradio?qqpanel");
info[1]=new Array("综艺之声","http://qr.fm.qq.com/qqradio?qqpanel");
info[2]=new Array("音乐休闲","http://qr.fm.qq.com/music?qqpanel");
info[3]=new Array("我的娱乐","http://qr.fm.qq.com/daren?qqpanel");
var auto='';
function changeLink(n){
var nA=E('sbox').getElementsByTagName('a');
var m=0;
switch(n){
case 1:m=0;break;
case 2:m=3;break;
case 3:m=6;break;
}
for(var i=0;i<8;i++){
if(m==i)nA[i].className="click1";
else
nA[i].className="click0";
}
}
function p(v){
now=v;
changeLink(v);
plays();
}
function plays(){
E("media").URL=info[now][1];
auto=setInterval("state()", 1000);
}
function vup()
{
var vlm = E("media").settings.volume;
if (vlm < 100 ){
vlm += 10;
E("media").settings.volume = vlm;
E("show").innerHTML="当前音量:"+vlm+"%";
}
}

function vdown(){
var vlm = E("media").settings.volume;
if (vlm > 0 ){

vlm -= 10;
E("media").settings.volume = vlm;
E("show").innerHTML="当前音量:"+vlm+"%";
}
}
var flag=1;
var vlm = E("media").settings.volume;
function mute(){

if(flag){
E("media").settings.volume=0;
flag=0;
E("show").innerHTML=""+info[now][0]+"(静音)";
E("muteimg").src="http://mat1.qq.com/fm/images/dg/b_bmute1.gif"
}
else{
E("media").settings.volume=vlm;
flag=1;
E("muteimg").src="http://mat1.qq.com/fm/images/dg/b_bmute0.gif"
}
}
function stop(){
E("media").controls.stop();
}
/*状态控制*/

function state(){
var nowState = E("media").playState;
switch(nowState){
case 1:
E("show").innerHTML=""+info[now][0]+"停止播放";break;
case 3:
E("show").innerHTML="您正在收听 - "+info[now][0]+"";break;
case 6:
E("show").innerHTML="节目连接中,请耐心等待...";break;
case 10:
E("show").innerHTML=""+info[now][0]+"(准备就绪...)";break;
case 9:
E("show").innerHTML=""+info[now][0]+"(重新连接...)";break;
default:
E("show").innerHTML="loading.....";
}
}
p(0);
</script>

</div>
<script language="javascript">
<!--
marqueesHeight=86;
stopscroll=false;
with(marquees){
noWrap=true;
style.width=164;
style.height=marqueesHeight;
style.overflowY="hidden";
onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false");
}

document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden;overflow:hidden;"></div>');
function init(){ //
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollUp()",30);
}
document.body.onload=init;
preTop=0; function scrollUp(){ if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1; //当然不仅如此,同样还要向下滚动一个像素(+1):
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight+1;
}
}
-->
</script>
</body>
</html>

以上是该段代码,说红色部分未定义,请帮助解决

[此贴子已经被作者于2007-11-20 18:48:35编辑过]

搜索更多相关主题的帖子: marquees 定义 DTD dtd 
2007-11-20 18:47
boofox
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-11-20
收藏
得分:0 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>QQ面板</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #000000;
line-height:150%;
}
body {
background:url(http://mat1.qq.com/fm/images/dg/bbg.gif) no-repeat left top;
margin:10px 0 0 12px;
background-image: url();
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #999999;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
.cwhite{color:white}
.c1{color:#FF7100}
a.lc2:link,a.lc2:visited {color:#595959;text-decoration:underline}
a.lc2:hover{text-decoration:none}
a.click1:link,a.click1:visited,a.click1:hover{font-weight:bold;}
a.click0:link,a.click0:visited,a.click0:hover{text-decoration:none}
a.click0:hover{text-decoration:underline}
#sbox{
margin:3px auto;
width:183px;
border:1px solid #595959;
padding:1px;
color:white;
}
#sbox td{color:white;}
#sbox a{color:white;}
#songList{margin:4px auto;}

.l1{border-bottom:1px solid #FE9101}
.l2{border-bottom:1px solid #FFB300}
.list{padding:3px;border:1px solid #D9D9D9;background:#fff;}
.inp{border:1px solid #BBB;width:83px;height:16px;}
.int{width:164px;height:47px;border:0;font-size:12px;line-height:150%}
.cu{cursor:pointer}
.dot{background:url(http://mat1.qq.com/fm/images/dg/b_dot.gif) repeat-x bottom}
.mylist{background:#fff;border-left:1px solid #CCC;border-right:1px solid #CCC;}
-->
</style></head>

<body>
<script language="JavaScript">
function qqping_url_build()
{
p=window.top.document.URL.indexOf("?");
if(-1==p)p=window.top.document.URL.indexOf("&");
if(-1==p)address="u="+window.top.document.URL;
else address="u="+window.top.document.URL.substring(0,p);
p=document.referrer.indexOf("?");
if(-1==p)p=window.top.document.referrer.indexOf("&");
if(-1==p)refer="r="+window.top.document.referrer;
else refer="r="+window.top.document.referrer.substring(0,p);
return address+"&"+refer;
}
document.write("<div style='position:absolute; left:0px; top:0px; width:0px; height:0px; z-index:0; visibility: hidden;'><img src='http://ping.qq.com/ping?" + qqping_url_build() + "' height='0' width='0'></div>");
</script>
<iframe name="hf" width=0 height=0></iframe>
<table width="193" height="85" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="37"><a href="http://fm.qq.com" target="_blank"><img src="http://img1.qq.com/fm/pics/3572/3572477.gif" width="193" height="37" border="0" /></a></td>
</tr>
<tr>
<td height="36" align="center" background="http://mat1.qq.com/fm/images/dg/b_a1.gif" class="cwhite"><span id="show">您正在收听-综艺之声
</span></td>
</tr>
<tr>
<td><img src="http://mat1.qq.com/fm/images/dg/b_a2.gif" width="193" height="12" /></td>
</tr>
</table>
<table width="193" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="64" align="center" valign="bottom" background="http://mat1.qq.com/fm/images/dg/b_b1.gif" class="cwhite">选台收听</td>
<td width="10"><img src="http://mat1.qq.com/fm/images/dg/b_b2.gif" width="10" height="30" /></td>
<td width="21" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bplay0.gif" width="21" height="30" onclick="plays()" alt="开始播放" /></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bstop0.gif" width="22" height="30" onclick="stop()" alt="停止播放" /></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bmute0.gif" id="muteimg" width="22" height="30" onclick="mute()" alt="静音控制"/></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bvup.gif" width="22" height="30" onclick="vup()" alt="增大音量"/></td>
<td width="22" class="cu"><img src="http://mat1.qq.com/fm/images/dg/b_bvdown.gif" width="22" height="30" onclick="vdown()" alt="减小音量"/></td>
<td width="10"><img src="http://mat1.qq.com/fm/images/dg/b_b3.gif" width="10" height="30" /></td>
</tr>
<tr>
<td height="7" colspan="8" bgcolor="#3F3F3F"></td>
</tr>
</table>
<table width="193" border="0" cellpadding="0" cellspacing="0" bgcolor="#3F3F3F">
<tr>
<td><div id="sbox">
<table width="183" border="0" cellpadding="0" cellspacing="0" background="http://mat1.qq.com/fm/images/dg/b_cbg.gif">
<tr>
<td width="22" height="25" align="center" class="l1"><img src="http://mat1.qq.com/fm/images/dg/b_c2.gif" width="8" height="7" /></td>
<td width="86" class="l1"><a href="#" onclick="p(1)">综艺之声</a></td>
<td width="42" align="center" class="l1">[<a href="#" onclick="p(1)">收听</a>]</td>
<td width="33" class="l1"><a href="#" onclick="p(1)"><img src="http://mat1.qq.com/fm/images/dg/b_cring.gif" width="28" height="10" border="0" /></a></td>
</tr>
<tr class="l2">
<td height="25" align="center" class="l2"><img src="http://mat1.qq.com/fm/images/dg/b_c2.gif" width="8" height="7" /></td>
<td class="l2"><a href="#" onclick="p(2)">音乐休闲</a></td>
<td align="center" class="l2">[<a href="#" onclick="p(2)">收听</a>]</td>
<td class="l2"><a href="#" onclick="p(2)"><img src="http://mat1.qq.com/fm/images/dg/b_cring.gif" width="28" height="10" border="0" /></a></td>
</tr>
<tr>
<td height="25" align="center"><img src="http://mat1.qq.com/fm/images/dg/b_c2.gif" width="8" height="7" /></td>
<td><a href="#" onclick="p(3)">我的娱乐</a></td>
<td align="center">[<a href="#" onclick="p(3)">收听</a>]</td>
<td><a href="#" onclick="p(3)"><img src="http://mat1.qq.com/fm/images/dg/b_cring.gif" width="28" height="10" border="0" /></a></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td><img src="http://mat1.qq.com/fm/images/dg/b_c1.gif" width="193" height="10" /></td>
</tr>
</table>
<table width="193" height="71" border="0" cellpadding="0" cellspacing="0" background="http://mat1.qq.com/fm/images/dg/b_d7.gif">

</table>
<table width="193" border="0" cellpadding="0" cellspacing="0" background="http://mat1.qq.com/fm/images/dg/b_e2.gif" style="margin-top:4px;">
<tr>

</tr>
</table>
<div style="display:none">
<object id="media" classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' width=0 height=0 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading Microsoft? Windows Media? Player components... type=application/x-oleobject>
<param name='URL' value='http://qr.fm.qq.com/qqradio?qqpanel'>
<param name='UIMode' value='full'>
<param name='AutoStart' value='true'>
<param name='Enabled' value='true'>
<param name='enableContextMenu' value='false'>
<param name="DisplayBackColor" value="100">
<param name="DisplayForeColor" value="100">

<param name='WindowlessVideo' value='true'>
</object>
<script language="javascript">var url="http://qr.fm.qq.com/qqradio?qqpanel";</script>
<script>
function E(obj){return document.getElementById(""+obj+"")}
var now=0;
var info=new Array();
info[0]=new Array("综艺之声","http://qr.fm.qq.com/qqradio?qqpanel");
info[1]=new Array("综艺之声","http://qr.fm.qq.com/qqradio?qqpanel");
info[2]=new Array("音乐休闲","http://qr.fm.qq.com/music?qqpanel");
info[3]=new Array("我的娱乐","http://qr.fm.qq.com/daren?qqpanel");
var auto='';
function changeLink(n){
var nA=E('sbox').getElementsByTagName('a');
var m=0;
switch(n){
case 1:m=0;break;
case 2:m=3;break;
case 3:m=6;break;
}
for(var i=0;i<8;i++){
if(m==i)nA[i].className="click1";
else
nA[i].className="click0";
}
}
function p(v){
now=v;
changeLink(v);
plays();
}
function plays(){
E("media").URL=info[now][1];
auto=setInterval("state()", 1000);
}
function vup()
{
var vlm = E("media").settings.volume;
if (vlm < 100 ){
vlm += 10;
E("media").settings.volume = vlm;
E("show").innerHTML="当前音量:"+vlm+"%";
}
}

function vdown(){
var vlm = E("media").settings.volume;
if (vlm > 0 ){

vlm -= 10;
E("media").settings.volume = vlm;
E("show").innerHTML="当前音量:"+vlm+"%";
}
}
var flag=1;
var vlm = E("media").settings.volume;
function mute(){

if(flag){
E("media").settings.volume=0;
flag=0;
E("show").innerHTML=""+info[now][0]+"(静音)";
E("muteimg").src="http://mat1.qq.com/fm/images/dg/b_bmute1.gif"
}
else{
E("media").settings.volume=vlm;
flag=1;
E("muteimg").src="http://mat1.qq.com/fm/images/dg/b_bmute0.gif"
}
}
function stop(){
E("media").controls.stop();
}
/*状态控制*/

function state(){
var nowState = E("media").playState;
switch(nowState){
case 1:
E("show").innerHTML=""+info[now][0]+"停止播放";break;
case 3:
E("show").innerHTML="您正在收听 - "+info[now][0]+"";break;
case 6:
E("show").innerHTML="节目连接中,请耐心等待...";break;
case 10:
E("show").innerHTML=""+info[now][0]+"(准备就绪...)";break;
case 9:
E("show").innerHTML=""+info[now][0]+"(重新连接...)";break;
default:
E("show").innerHTML="loading.....";
}
}
p(0);
</script>

</div>
<script language="javascript">
<!--
marqueesHeight=86;
stopscroll=false;
with(marquees){
noWrap=true;
style.width=164;
style.height=marqueesHeight;
style.overflowY="hidden";
onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false");
}

document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden;overflow:hidden;"></div>');
function init(){ //
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollUp()",30);
}
document.body.onload=init;
preTop=0; function scrollUp(){ if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1; //当然不仅如此,同样还要向下滚动一个像素(+1):
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight+1;
}
}
-->
</script>
</body>
</html>

2007-11-20 18:48
快速回复:[求助]'marquees' 未定义错误 请求帮助
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.071812 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved