⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 portraitselect.js

📁 请认真阅读您的文件包然后写出其具体功能(至少要20个字)。尽量不要让站长把时间都花费在为您修正说明上。压缩包解压时不能有密码。
💻 JS
字号:
// 表情数组数据
var imagePath = "../images/emot/";
var imageWidth = 24;
var imageHeight = 24;
var countPerRow = 10;
var sHTML = "";
var sHTMLHead = "";
function portrait(name, alt, shortcut)
{
    this.name = name;
    this.alt = alt;
    this.shortcut = shortcut;
}

    var imgArray = new Array();
    imgArray[0] = new portrait("emot1.gif", "", ":)");
    imgArray[1] = new portrait("emot2.gif", "", ":))");
    imgArray[2] = new portrait("emot3.gif", "" ,"");
    imgArray[3] = new portrait("emot4.gif", "" ,"");
    imgArray[4] = new portrait("emot5.gif", "" ,"");
    imgArray[5] = new portrait("emot6.gif", "" ,"");
    imgArray[6] = new portrait("emot7.gif", "" ,"");
    imgArray[7] = new portrait("emot8.gif", "" ,"");
    imgArray[8] = new portrait("emot9.gif", "" ,"");
    imgArray[9] = new portrait("emot10.gif", "" ,"");
    imgArray[10] = new portrait("emot11.gif", "" , "");
    imgArray[11] = new portrait("emot12.gif", "" , "");
    imgArray[12] = new portrait("emot13.gif", "" , "");
    imgArray[13] = new portrait("emot14.gif", "" , "");
    imgArray[14] = new portrait("emot15.gif", "" , "");
    imgArray[15] = new portrait("emot16.gif", "" , "");
    imgArray[16] = new portrait("emot17.gif", "" , "");
    imgArray[17] = new portrait("emot18.gif", "" , "");
    imgArray[18] = new portrait("emot19.gif", "" , "");
    imgArray[19] = new portrait("emot20.gif", "" , "");
    imgArray[20] = new portrait("emot21.gif", "" , "");
    imgArray[21] = new portrait("emot22.gif", "" , "");
    imgArray[22] = new portrait("emot23.gif", "" , "");
    imgArray[23] = new portrait("emot24.gif", "" , "");
    imgArray[24] = new portrait("emot25.gif", "" , "");
    imgArray[25] = new portrait("emot26.gif", "" , "");
    imgArray[26] = new portrait("emot27.gif", "" , "");
    imgArray[27] = new portrait("emot28.gif", "" , "");
    imgArray[28] = new portrait("emot29.gif", "" , "");
    imgArray[29] = new portrait("emot30.gif", "" , "");
    imgArray[30] = new portrait("emot31.gif", "" , "");
    imgArray[31] = new portrait("emot32.gif", "" , "");
    imgArray[32] = new portrait("emot33.gif", "" , "");
    imgArray[33] = new portrait("emot34.gif", "" , "");
    imgArray[34] = new portrait("emot35.gif", "" , "");
    imgArray[35] = new portrait("emot36.gif", "" , "");
    imgArray[36] = new portrait("emot37.gif", "" , "");
    imgArray[37] = new portrait("emot38.gif", "" , "");
    imgArray[38] = new portrait("emot39.gif", "" , "");
    imgArray[39] = new portrait("emot40.gif", "" , "");
    imgArray[40] = new portrait("emot41.gif", "" , "");
    imgArray[41] = new portrait("emot42.gif", "" , "");
    imgArray[42] = new portrait("emot43.gif", "" , "");
    imgArray[43] = new portrait("emot44.gif", "" , "");
    imgArray[44] = new portrait("emot45.gif", "" , "");
    imgArray[45] = new portrait("emot46.gif", "" , "");
    imgArray[46] = new portrait("emot47.gif", "" , "");
    imgArray[47] = new portrait("emot48.gif", "" , "");
    imgArray[48] = new portrait("emot49.gif", "" , "");
    imgArray[49] = new portrait("emot50.gif", "" , "");

function drawSpace()
{
    sHTML +='</tr><tr align="left" bgcolor="#f8f8f8" class="unnamed1">';
}
function drawPortrat( index )
{
    if (index<0 || index>imgArray.length) return;
    var portratContent ='<img src="' + imagePath + imgArray[index].name + '" ' +
                        'alt="' + imgArray[index].alt + '" ' +
                        'width="' + imageWidth + '" ' + 
                        'height="' + imageHeight + '" >';
    sHTML +='<td align="center">';
    sHTML +=portratContent;
    sHTML +='</td>';
}
function drawPortratsHead()
{
	sHTMLHead = "";
    sHTMLHead +='<td colspan="' + countPerRow + '"  align="center"> <strong>表情</strong></td>';
	return sHTMLHead;
}
function drawPortrats()
{
    var i = 0;
	sHTML = "";
    for (i=0; i<imgArray.length; i++) {
        if (i>0 && i%countPerRow==0)    drawSpace();
        drawPortrat( i );
    }
	return sHTML;
}
function MouseClick( index )
{
    window.returnValue = imagePath + imgArray[index].name;
    window.close();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -