English
<html> <head> <title>Simulating OICQ drop-down avatar</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="javascript"> // Provider: Xiaobai //Contact method: //qq:14681571 //email:xiaobai@17560.net //Description: //I saw an article on the Internet that simulates oicq selection of images //But the program just gives A method was mentioned, but it did not achieve the real practical effect: it cannot be chosen. //Newbie has improved it, here is the complete source code //Passed test: win2ks //Prepare 6 pictures: the file names are shown in the code below //Among them: /u/info_img/2009-06/18/logo .gif is the picture when no selection is made. var bV=parseInt(navigator.appVersion); var IE4=((document.all)&&(bV>=4))?true:false; var NS4=(document.layers)?true :false; var z=0; function LayerV(LayerName,V){ E=eval('document.'+LayerName); if(IE4) E=eval('document.all.'+LayerName+'.style'); E.visibility=(V?'visible':'hidden'); } /////////////////////////////////// /////////////////////////// //The following function implements the selection of the picture when the picture is clicked function select(image1){ var html, url1 url1=image1.src html="<img src="+url1+" width=70 height=70 onclick='javascript:select(this)'>" html=html+"<a href=javascript:LayerV('Zhong' ,z=1-z)><font style='font-family: Webdings;'>6</font></a>" pic.innerHTML=html LayerV('Zhong',z=1-z) } / //////////////////////////////////////////////// </script> </head> <body bgcolor="#FFFFFF"> <table width="90" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#FF66FF"> <tr> <td align="right"><font style="font-size:12px"><div id=pic ><img src="/u/info_img/2009-06/18/logo.gif" width=70 height=70 onclick="javascript:LayerV('Zhong',z=1-z)"><a href= "javascript:LayerV('Zhong',z=1-z)"><font style="font-family: Webdings;">6</font></a></div></td> </tr > </table> </td> </tr> <tr> <td><div id="Zhong" style="position:relative ;visibility:hidden ;width:90px ;height:150px ;overflow:scroll;" > <img src='/u/info_img/2009-06/18/logo.gif' width=70 height=70 onclick='javascript:select(this)'> <img src="" width=70 height=70 onclick="javascript:select(this)"> <img src="" width=70 height=70 onclick="javascript:select(this)"> <img src="" width=70 height=70 onclick="javascript :select(this)"> <img src="" width=70 height=70 onclick="javascript:select(this)"> <img src="" width=70 height=70 onclick="javascript:select(this )"> </div></td> </tr> </table> </body> </html>