脚本宝典收集整理的这篇文章主要介绍了怎么把select下拉菜单里的文字设置成左右滚动效果 ,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
希望
用Marquee标签来设置字体滚动,代码是下面这样写的,但是没有效果,字体还是不会滚动,
应该怎么来写,才会实现这个效果呢?
<ht
ML:select
PRo
PErty=”w_project_cd[]” value=”<%=prj.toString()%>” onchange=”<%=js.toString()%>” style=”width:260px”>
<
LOGic:notEmpty n
ame=”proj_list”>
<
;marquee direction=”left” behavior=”scroll” scrolla
mount=”10″ scrolldelay=”200″> <html:options collection=”proj_list” property=”value” labelProperty=”label”/></marquee>
</logic:notEmpty>
</html:select>
在网上
找到了一个类似的例子,如下详细的代码:
HTML code:
<!DOCTYPE html P
ubLIC "-//W3C//DTD XHTML 1.0 Trans
ITional//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>无标题文档</title>
<script type="text/javascript">
function init(){
VAR os=document.
getelementsbytagname("option");
for(var i=0;i<os.length;
i++){
var tx=os[i].innerHTML;
var l=tx.length;
var b=tx.substring(0,1);
var e=tx.substring(1);
os[i].innerHTML=e+b;
}
window.setTimeout(init,1000);
}
window.onload=init;
</script>
</head>
<body>
<select>
<option>一个用法</option>
<option>也许
人生就是如此</option>
<option>
云在青天,水在瓶</option>
</select>
</body>
</html>
脚本宝典总结
以上是脚本宝典为你收集整理的怎么把select下拉菜单里的文字设置成左右滚动效果 全部内容,希望文章能够帮你解决怎么把select下拉菜单里的文字设置成左右滚动效果 所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。