js焦点图切换图片的数字按钮代码怎么写?要有鼠标点击、经过、离开的效果的

JavaScript010

js焦点图切换图片的数字按钮代码怎么写?要有鼠标点击、经过、离开的效果的,第1张

<div style="background-color: silverpadding:60pxwidth:130px" onclick="this.style.backgroundColor='green'" onmousemove="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='silver'" >520</div>

通过服务器端程序输出给JS就行了,如 <script type="text/javascript">

var image=[]

<% response.write("image[" &0 &"]='" &这里从数据库读出来的图片 &"'")

response.write("image[" &1 &"]='" &这里从数据库读出来的图片 &"'")

%>

</script>

这样就把你的内容输出到JS这边了。数据库是啥 这边就是啥。