一 js操作table
来源:互联网 发布:网络在线客服是什么 编辑:程序博客网 时间:2024/05/22 06:06
function AddAttachments()
{
document.getElementById( 'attach ').innerText = "继续添加附件 ";
tb = document.getElementById( 'attAchments ');
newRow = tb.insertRow();
newRow.insertCell().innerHTML = " <input class= 'ButtonCss ' name= 'File ' size= '50 ' type= 'file '> <input class= 'ButtonCss ' type=button value= '删除 ' onclick= 'delFile(this.parentElement.parentElement.rowIndex) '> ";
}
function delFile(index)
{
document.getElementById( 'attAchments ').deleteRow(index);
tb.rows.length > 0?document.getElementById( 'attach ').innerText = "继续添加附件 ":document.getElementById( 'attach ').innerText = "继续添加附件 ";
}
{
document.getElementById( 'attach ').innerText = "继续添加附件 ";
tb = document.getElementById( 'attAchments ');
newRow = tb.insertRow();
newRow.insertCell().innerHTML = " <input class= 'ButtonCss ' name= 'File ' size= '50 ' type= 'file '> <input class= 'ButtonCss ' type=button value= '删除 ' onclick= 'delFile(this.parentElement.parentElement.rowIndex) '> ";
}
function delFile(index)
{
document.getElementById( 'attAchments ').deleteRow(index);
tb.rows.length > 0?document.getElementById( 'attach ').innerText = "继续添加附件 ":document.getElementById( 'attach ').innerText = "继续添加附件 ";
}
function addFile()
{
var str = ' <INPUT type= "file " size= "50 " Name= "File "> '
document.getElementById( 'MyFile ').insertAdjacentHTML( "beforeEnd ",str)
}
function delFile()
{
var objArr=document.getElementById( 'MyFile ').getElementsByTagName( "input ");
objArr[objArr.length-1].removeNode(true);
}
{
var str = ' <INPUT type= "file " size= "50 " Name= "File "> '
document.getElementById( 'MyFile ').insertAdjacentHTML( "beforeEnd ",str)
}
function delFile()
{
var objArr=document.getElementById( 'MyFile ').getElementsByTagName( "input ");
objArr[objArr.length-1].removeNode(true);
}
- 一 js操作table
- js对table常用的操作(学习分享一)
- JS 操作 Table
- JS操作table
- js 操作table
- js操作table
- js操作table tr
- JS操作table
- js操作table
- js操作table
- js操作table
- js操作table排序
- js 操作 table
- js 操作 table
- js 操作table
- js操作table
- js - table操作
- JS操作table!js table行数
- 法语会话短句20_722
- ABAP实践学习--灰色的ALV显示
- [MySQL]Install and Configure MySQL in Ubuntu
- IBM高绩效的薪酬文化
- ABAP实践学习--直接导出到excel实例
- 一 js操作table
- NHibernate Cookbook 学习笔记 5
- [MySQL]Improve performance of MySQL
- Adapter模式
- 菜鸟入门 Ubuntu 常用命令收集
- J2EE、CORBA、DNA三种主流中间件平台比较(1)
- 简明Vim练级攻略
- SQL Server 日期和时间函数
- 上善若水 厚德载物 天道酬勤