热门关键字:  PHP  Cisco  seo  网络广告 虚拟主机 中文域名
当前位置 :| 主页>网页特效>表单操作>

点击后可更换图片的下拉框(图片载入时还可随机显示)

来源: 作者: 时间:2005-12-31 点击:


<!-- 要实现此效果需要 1 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<script>
function showimage(){
document.images.tus.src=""+document.f1.userface.options[document.f1.userface.selectedIndex].value+"";
}

facetol=4;
temp = Math.floor(Math.random() * facetol+1);

document.write("<img src=../images/296/"+temp+".gif name=tus> ")
document.write("<form name=f1><select name=userface size=1 onChange=showimage()>")

for(i=1;i<=facetol;i++) {
if (i==temp) ii="selected";else ii=""
document.write("<option value='../images/296/"+i+".gif' "+ii+">"+i+"</option>")
}
document.write("</select></form>")
</script>


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
赞助商连接