<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
</style>
</head>
<body>
<table style="width: 1500px;">
<thead>
<tr>
<td rowspan="2">占2行1列</td>
<td colspan="2">占1行2列</td>
<td rowspan="2">占2行1列</td>
</tr>
<tr>
<td>占1行1列</td>
<td>占1行1列</td>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td rowspan="2">内容1(2列)</td>
<td>内容1</td>
<td>内容2</td>
<td rowspan="2">xxxx</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
</tbody>
</tbody>
</table>
<button id="excel_btn">导出excel</button>
</body>
<script type="text/javascript" src="jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="base64.js"></script>
<script type="text/javascript" src="tableExport.js"></script>
<script>
$('#excel_btn').click(function(){
$('table').tableExport({type:'excel',escape:'false', tableName:'xxx'});
});
</script>
</html>
- 1
- 2
前往页