在jsp中如何加闪烁的标签!!! http://blog.csdn.net/net_lover/archive/2001/01/15/6826.aspx 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 显示与隐藏:如果在后台判断,可以<%//条件if(xxx==true){%><table align=center width="800" border="0" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm "> <tr> <td width="100%" height="25" background="<%=channelBGImage%>" align="center"> [账号:管理员] </td> </tr></table><%}%> 也可以使用ajax,xmlhttp来进行js实现显示与隐藏xxID.style.display="none"xxID.style.display="" 楼上的,我隐藏只是隐藏标签,table及账号不用隐藏。谢谢:) 闪烁标签没有,写段脚本楼主参考一下:<html><script>var flickColor = "#FF0000|#FFFF00|#3366FF" ;var deFaultColor = "#000000" ;var flickSpeed = 100 ;function flick( the , flickColor , deFaultColor , flickSpeed ){ var _index = 0 ; var flickArray = flickColor.split( "|" ) ; var ID = setInterval( _flick , flickSpeed ) the.setAttribute( "flickID" , ID ) ; the.setAttribute( "deFaultColor" , deFaultColor ) ; function _flick() { the.style.color = flickArray[ _index++ % flickArray.length ] ; }}function stopFlick( the ){ var ID = the.getAttribute( "flickID" ) ; var c = the.getAttribute( "deFaultColor" ) ; clearInterval( ID ) ; the.style.color = c ;}function div_click( the ){ if( the.getAttribute( "flag" ) == null ) { the.setAttribute( "flag" , true ) ; } if( the.getAttribute( "flag" ) ) { flick( the , flickColor , deFaultColor , flickSpeed ) ; the.innerHTML = "点我结束" ; the.setAttribute( "flag" , false ) ; } else { stopFlick( the ) ; the.innerHTML = "点我开始" ; the.setAttribute( "flag" , true ) ; }}</script><body><div onclick="div_click( this )">点我开始</div></body></html> //楼主在JSP中判断是否要显示与闪烁。<script language="javascript" type="text/javascript"> function checkit() { self.setInterval("changeit()",1000); } function changeit() { var colors = new Array('#FF9900','#3366FF','#33FF00','#FF00FF'); var sign = Math.ceil(Math.random()*10)%3; var news = document.getElementById("news"); news.style.color = colors[sign]; }</script></HEAD><BODY onload="checkit('news');return true;"><button onclick="window.clearInterval();">aSDasd</button><table align=center width="800" border="1" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm "><tr><td width="100%" height="25" background="<%=channelBGImage%>" align="center">[账号:管理员]<span id="news" style="">你有新短消息,请注意查收!!</span></td></tr></table></BODY></HTML> <script language="javascript" type="text/javascript"> function checkit() { window._x=self.setInterval("changeit()",1000); } function changeit() { var colors = new Array('#FF9900','#3366FF','#33FF00','#FF00FF'); var sign = Math.ceil(Math.random()*10)%3; var news = document.getElementById("news"); news.style.color = colors[sign]; }</script></HEAD><BODY onload="checkit('news');return true;"><button onclick="window.clearInterval();">aSDasd</button><table align=center width="800" border="1" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm "><tr><td width="100%" height="25" background="<%=channelBGImage%>" align="center">[账号:管理员]<span id="news" style="" onclick="window.clearInterval(_x);this.style.color='#000'">你有新短消息,请注意查收!!</span></td></tr></table></BODY></HTML> <script language="javascript" type="text/javascript"> function checkit() { window._x=self.setInterval("changeit()",1000); } function changeit() { var colors = new Array('#FF9900','#3366FF','#33FF00','#FF00FF'); var sign = Math.ceil(Math.random()*10)%3; var news = document.getElementById("news"); news.style.color = colors[sign]; }</script></HEAD><BODY onload="checkit('news');return true;"><button onclick="window.clearInterval();">aSDasd</button><table align=center width="800" border="1" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm "><tr><td width="100%" height="25" background="<%=channelBGImage%>" align="center">[账号:管理员]<span id="news" style="" onclick="window.clearInterval(_x);this.style.display='none'">你有新短消息,请注意查收!!</span></td></tr></table></BODY></HTML> 非常感谢谢大家。感谢BlueDestiny(这回真的准备要改名字了...) ,lantersen(蓝水仁),xishanlang2001(西山狼2000) ,net_lover(【孟子E章】) ( option 不支持hide()以及filter()? 反正弦 精度 如何取消选中的文本selection.createRange().text 奇怪的问题 关于字符串截取 onresize问题,要疯了~~~~ 表格问题,急急急! 请问JS如何控制滚动条? 谁能讲讲怎样使用MS的那棵deeptree.htc? 郁闷的难解问题!!高分求救!在线等 输入问题? 如何删除new创建对象或释放该对象的内存
如果在后台判断,可以
<%
//条件
if(xxx==true)
{
%>
<table align=center width="800" border="0" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm ">
<tr>
<td width="100%" height="25" background="<%=channelBGImage%>" align="center">
[账号:管理员]
</td>
</tr>
</table>
<%
}
%>
xxID.style.display="none"
xxID.style.display=""
谢谢:)
<script>
var flickColor = "#FF0000|#FFFF00|#3366FF" ;
var deFaultColor = "#000000" ;
var flickSpeed = 100 ;
function flick( the , flickColor , deFaultColor , flickSpeed )
{
var _index = 0 ;
var flickArray = flickColor.split( "|" ) ;
var ID = setInterval( _flick , flickSpeed )
the.setAttribute( "flickID" , ID ) ;
the.setAttribute( "deFaultColor" , deFaultColor ) ;
function _flick()
{
the.style.color = flickArray[ _index++ % flickArray.length ] ;
}
}
function stopFlick( the )
{
var ID = the.getAttribute( "flickID" ) ;
var c = the.getAttribute( "deFaultColor" ) ;
clearInterval( ID ) ;
the.style.color = c ;
}
function div_click( the )
{
if( the.getAttribute( "flag" ) == null )
{
the.setAttribute( "flag" , true ) ;
}
if( the.getAttribute( "flag" ) )
{
flick( the , flickColor , deFaultColor , flickSpeed ) ;
the.innerHTML = "点我结束" ;
the.setAttribute( "flag" , false ) ;
}
else
{
stopFlick( the ) ;
the.innerHTML = "点我开始" ;
the.setAttribute( "flag" , true ) ;
}
}
</script><body>
<div onclick="div_click( this )">点我开始</div>
</body>
</html>
<script language="javascript" type="text/javascript">
function checkit()
{
self.setInterval("changeit()",1000);
}
function changeit()
{
var colors = new Array('#FF9900','#3366FF','#33FF00','#FF00FF');
var sign = Math.ceil(Math.random()*10)%3;
var news = document.getElementById("news");
news.style.color = colors[sign];
}
</script>
</HEAD><BODY onload="checkit('news');return true;">
<button onclick="window.clearInterval();">aSDasd</button>
<table align=center width="800" border="1" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm ">
<tr>
<td width="100%" height="25" background="<%=channelBGImage%>" align="center">[账号:管理员]<span id="news" style="">你有新短消息,请注意查收!!</span></td>
</tr>
</table>
</BODY>
</HTML>
function checkit()
{
window._x=self.setInterval("changeit()",1000);
}
function changeit()
{
var colors = new Array('#FF9900','#3366FF','#33FF00','#FF00FF');
var sign = Math.ceil(Math.random()*10)%3;
var news = document.getElementById("news");
news.style.color = colors[sign];
}
</script>
</HEAD><BODY onload="checkit('news');return true;">
<button onclick="window.clearInterval();">aSDasd</button>
<table align=center width="800" border="1" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm ">
<tr>
<td width="100%" height="25" background="<%=channelBGImage%>" align="center">[账号:管理员]<span id="news" style="" onclick="window.clearInterval(_x);this.style.color='#000'">你有新短消息,请注意查收!!</span></td>
</tr>
</table>
</BODY>
</HTML>
function checkit()
{
window._x=self.setInterval("changeit()",1000);
}
function changeit()
{
var colors = new Array('#FF9900','#3366FF','#33FF00','#FF00FF');
var sign = Math.ceil(Math.random()*10)%3;
var news = document.getElementById("news");
news.style.color = colors[sign];
}
</script>
</HEAD><BODY onload="checkit('news');return true;">
<button onclick="window.clearInterval();">aSDasd</button>
<table align=center width="800" border="1" cellspacing="0" cellpadding="0" style="border-Left: 0;border-Bottom:0.0cm ">
<tr>
<td width="100%" height="25" background="<%=channelBGImage%>" align="center">[账号:管理员]<span id="news" style="" onclick="window.clearInterval(_x);this.style.display='none'">你有新短消息,请注意查收!!</span></td>
</tr>
</table>
</BODY>
</HTML>