function GetInfoFromTable(tableid) { var tableInfo = ""; var tableObj = document.getElementById(tableid); for (var i = 0; i < tableObj.rows.length; i++) { //遍历Table的所有Row for (var j = 0; j < tableObj.rows[i].cells.length; j++) { //遍历Row中的每…
<html> <head> <title></title> <script type="text/javascript"> function deleteCurrentRow(obj){ var tr=obj.parentNode.parentNode; var tbody=tr.parentNode; tbody.removeChild(tr); //只剩行首时删除表格 if(tbody.rows.length==1) {…
function getSearchString(key) { // 获取URL中?之后的字符 var str = location.search; str = str.substring(1,str.length); // 以&分隔字符串,获得类似name=xiaoli这样的元素数组 var arr = str.split("&"); var obj = new Object(); // 将每一个数组元素以=分隔并赋给obj对象 for(var i = 0; i &l…
getobjs: function(objs, key, value) { var result = []; for (var i in objs) { var obj = $(objs[i]); if (obj.attr(key) == value) { result.push(obj[0]); } } return result; } getobjs(obj,key,value)…