MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » 怎么实现这个功能啊

怎么实现这个功能啊(2)

www.MyException.Cn  网友分享于:2013-12-16  浏览:10次

function addattachment(me)
{
attach = document.createElement( 'div ');
var aa = gObId( 'aa ');
var att = aa.parentNode;
if(att.id != 'att ')
return;

switch(VT_attachments)
{
case 0:
fileid0();
break;
case 1:
fileid1();
break;
case 2:
fileid2();
break;
case 3:
fileid3();
break;
case 4:
fileid4();
break;
case 5:
fileid5();
break;
case 6:
fileid6();
break;
case 7:
fileid7();
break;
case 8:
fileid8(); break;
case 9:
fileid9();
break;
}

att.insertBefore(attach,aa);
VT_attachments ++ ;
if(VT_attachments > = MAX_attachments)
{
Ohidden(aa);
}
}

function fileid0()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid0 " type= "file " name= "fileid0 " width= "550 " /> &nbsp; </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';
}

function fileid1()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid1 " type= "file " name= "fileid1 " /> &nbsp; </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';
}
function fileid2()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid2 " type= "file " name= "fileid2 " /> &nbsp; </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';
}
function fileid3()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid3 " type= "file " name= "fileid3 " /> &nbsp; </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';
}
function fileid4()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid4 " type= "file " name= "fileid4 " /> &nbsp; </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';
}
function fileid5()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid5 " type= "file " name= "fileid5 " /> </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';
}
function fileid6()
{
attach.innerHTML = '&nbsp;&nbsp; <span style= "font-size:10pt; "> &nbsp; <input id= "fileid6 " type= "file " name= "fileid6 " /> </span> <span class= "l " onclick= "javascript:delattachment(this); " style= "font-size:10pt; "> 删除 </span> ';

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有