惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
L
LangChain Blog
Jina AI
Jina AI
爱范儿
爱范儿
C
Check Point Blog
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
月光博客
月光博客
GbyAI
GbyAI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Stack Overflow Blog
Stack Overflow Blog
V
V2EX
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题

博客园 - 流云之心

招人啦 - 前端,后台开发专家 为什么不给程序员配好电脑 [翻译] SQL Server中对XML操作 开发常用小工具介绍 设计模式一 - Simple Factory, Factory Method, Abstract Factory以及Builder模式简述 强制休息程序 - EyeGuardian 眼睛守护者 Beta测试版 定时计划任务方案比较以及通过脚本创建计划任务(SchTasks命令) Excel Programming (C# + VBA) Part III Excel Programming (C# + VBA) Part II Excel programming (C# + VBA) Part 1 Harry Potter - The Half-Blood Prince 转移阵地了,新地址:http://spaces.msn.com/members/PuGong 关于XMLHTTP object的OPEN方法 smart client优势在那里? (草稿) SQL Server的collation问题 Microsoft Interview Question links 转自http://blogs.msdn.com/chappell/archive/2004/07/20/189364.aspx MSN to expand free e-mail storage to 250MB 用 #inculde file = "../fiel" 报1031错误 用<!--include file = ../ --> 报错误1031
javascript 将页面上的Table导出保存为Excel (无格式) - 流云...
流云之心 · 2007-12-06 · via 博客园 - 流云之心

 接受参数:Table的 ID

function tableToExcel(tblName)   
{
  
function String.prototype.Trim() {return this.replace(/(^\s*)|(\s*$)/g,"");}
  
try
  
{
    
var e = document.getElementById(tblName);
    
var s = ""
    
for (var j=0; j<e.rows.length; j++)
    
{
      
if (e.rows[j].style.display != "none")
      
{
        
for (var i=1; i<e.rows[j].cells.length; i++)
        
{
          
if (e.rows[j].cells[i].style.display != "none"
            s 
+= e.rows[j].cells[i].innerText.Trim() +"\t";
        }

        s 
+= "\r\n";
      }

    }

    
var xlsWindow = window.open("","_blank","width=100,height=100");
    xlsWindow.document.write(s);
    xlsWindow.document.execCommand('Saveas',
true,'%homeDrive%\\Data.xls');
    xlsWindow.close();
  }

  
catch(e)
  
{}
}