插入表情图标的功能

我看了一下dudu给我的代码EmoticonsGallery.aspx以及cs文件
我觉得是过度设计了:(

每次动态生成表情符号列表比较慢的(用<asp:Table id="EmoticonsTable" runat="server"></asp:Table>动态装载)
每次的闪烁居中(centerDialog)完全没有必要,闪烁也让人生厌的事情,
表情符号的窗口可以定死的,弹出的页面是htm静态页面即可

静态页面要居中在qq.gif的onclick事件中完成即可
像表情符号这种长期不变的完全可以做成静态页面
现在编辑器的闪烁特别厉害,估计脚本的功劳:(

< HTML >
    
< HEAD >
        
< TITLE > 插入表情图标 </ TITLE >
        
< META http - equiv = " Content-Type "  content = " text/html; charset=gb2312 " >
        
< STYLE type = " text/css " >
BODY {padding:5px}
IMG {CURSOR:hand;width:20px;height:20px;}
</ STYLE >
        
< SCRIPT language = " JavaScript " >
function  emotclick(){
    
if  ( " IMG " == event.srcElement.tagName.toUpperCase()) {
        dialogArguments.insertHTML(
" <IMG SRC= "   +  event.srcElement.src  +   " > " );
        window.returnValue 
=   null ;
        window.close();
    }
}
document.onclick
= emotclick;
        
</ SCRIPT >
    
</ HEAD >
    
< BODY bgcolor = " menu " >
        
< TABLE cellSpacing = " 5 "  border = " 0 "  align = " center " >
            
< TBODY >
                
< TR >
                    
< TD >< IMG src = " emot/01.gif " ></ TD >
                    
< TD >< IMG src = " emot/02.gif " ></ TD >
                    
< TD >< IMG src = " emot/03.gif " ></ TD >
                    
< TD >< IMG src = " emot/04.gif " ></ TD >
                    
< TD >< IMG src = " emot/05.gif " ></ TD >
                    
< TD >< IMG src = " emot/06.gif " ></ TD >
                    
< TD >< IMG src = " emot/07.gif " ></ TD >
                    
< TD >< IMG src = " emot/08.gif " ></ TD >
                    
< TD >< IMG src = " emot/09.gif " ></ TD >
                    
< TD >< IMG src = " emot/10.gif " ></ TD >
                
</ TR >
                
< TR >
                    
< TD >< IMG src = " emot/11.gif " ></ TD >
                    
< TD >< IMG src = " emot/12.gif " ></ TD >
                    
< TD >< IMG src = " emot/13.gif " ></ TD >
                    
< TD >< IMG src = " emot/14.gif " ></ TD >
                    
< TD >< IMG src = " emot/15.gif " ></ TD >
                    
< TD >< IMG src = " emot/16.gif " ></ TD >
                    
< TD >< IMG src = " emot/17.gif " ></ TD >
                    
< TD >< IMG src = " emot/18.gif " ></ TD >
                    
< TD >< IMG src = " emot/19.gif " ></ TD >
                    
< TD >< IMG src = " emot/20.gif " ></ TD >
                
</ TR >
                
< TR >
                    
< TD >< IMG src = " emot/21.gif " ></ TD >
                    
< TD >< IMG src = " emot/22.gif " ></ TD >
                    
< TD >< IMG src = " emot/23.gif " ></ TD >
                    
< TD >< IMG src = " emot/24.gif " ></ TD >
                    
< TD >< IMG src = " emot/25.gif " ></ TD >
                    
< TD >< IMG src = " emot/26.gif " ></ TD >
                    
< TD >< IMG src = " emot/27.gif " ></ TD >
                    
< TD >< IMG src = " emot/28.gif " ></ TD >
                    
< TD >< IMG src = " emot/29.gif " ></ TD >
                    
< TD >< IMG src = " emot/30.gif " ></ TD >
                
</ TR >
                
< TR >
                    
< TD >< IMG src = " emot/31.gif " ></ TD >
                    
< TD >< IMG src = " emot/32.gif " ></ TD >
                    
< TD >< IMG src = " emot/33.gif " ></ TD >
                    
< TD >< IMG src = " emot/34.gif " ></ TD >
                    
< TD >< IMG src = " emot/35.gif " ></ TD >
                    
< TD >< IMG src = " emot/36.gif " ></ TD >
                    
< TD >< IMG src = " emot/37.gif " ></ TD >
                    
< TD >< IMG src = " emot/38.gif " ></ TD >
                    
< TD >< IMG src = " emot/39.gif " ></ TD >
                    
< TD >< IMG src = " emot/40.gif " ></ TD >
                
</ TR >
                
< TR >
                    
< TD >< IMG src = " emot/41.gif " ></ TD >
                    
< TD >< IMG src = " emot/42.gif " ></ TD >
                    
< TD >< IMG src = " emot/43.gif " ></ TD >
                    
< TD >< IMG src = " emot/44.gif " ></ TD >
                    
< TD >< IMG src = " emot/45.gif " ></ TD >
                    
< TD >< IMG src = " emot/46.gif " ></ TD >
                    
< TD >< IMG src = " emot/47.gif " ></ TD >
                    
< TD >< IMG src = " emot/48.gif " ></ TD >
                    
< TD >< IMG src = " emot/49.gif " ></ TD >
                    
< TD >< IMG src = " emot/50.gif " ></ TD >
                
</ TR >
            
</ TBODY >
        
</ TABLE >
    
</ BODY >
</ HTML >

你可能感兴趣的:(插入表情图标的功能)