当前位置:编程学习 > JS >>

javascript问题!!!新手提问。。。大家来回答下!

the_image.src = the_new_image;为什么不可以改成window.document.sun1 = the_new_image;希望懂的来回答下!谢谢。。。。。。


<script type="text/javascript">function facuSwap(the_image,the_new_image,the_url){the_image.src = the_new_image;var my_window = window.open(the_url,my_window,'height=300,width=150');}</script></head><body><img src="01.jpg" name="sun1" border="0"onMouseOver="facuSwap(window.document.sun1,'011.jpg',' http://www.qq.com/');" onMouseOut="window.document.sun1.src='01.jpg';" />
追问:是传递图片src的!


the_image.src = the_new_image;为什么不可以改成window.document.sun1.src = the_new_image;呢?????????
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,