Home >Web Front-end >JS Tutorial >JavaScript flag transformation effect code_image special effects
1.页面的HTML代码如下:
2.change_flag函数
在线演示http://img.jb51.net/online/guoqi/Flags.html
打包下载http://img.jb51.net/online/guoqi/guoqi.rar<script> <BR>function change_flag( object ){ <BR> var img = document.getElementById("flag"); <BR> if( img ){ <BR> img.src = "Flags/" + object.value +"_flag[1].gif"; <BR> } <br><br>} <BR></script>