比如,一个表格有5行4列,如果只有第一行有数据,就从第二行到第五行画一个对角线。
如果1,2行有数据,就从第三至第五行画一个对角线,依此类推。
不知道如何解决?
哪怕先告诉我如何划线也好!!
---------------------------------------------------------------
1<html xmlns:v="urn:schemas-microsoft-com:vml">
2<head>
3<style>
4v\:* { behavior: url(#default#VML); }
5</style>
6<script>
7<!--
8function line(x1,y1,x2,y2){
9var line = document.createElement("v:line");
10line.From = x1+"px,"+y1+"px";
11line.To = x2+"px,"+y2+"px";
12line.StrokeColor="red";
13line.StrokeWeight = "1pt";
14line.Style="z-index:100; position:absolute; left:10px; top:15px; "
15drawline.innerHTML=line.outerHTML;
16}
17//-->
18</script>
19</head>
20<body>
21<table border="1" cellpadding="0" cellspacing="0">
22<tr>
23<td height="200" width="400">
24</td>
25</tr>
26</table>
27<div id="drawline"></div>
28<script language="JavaScript">
29line(0,0,400,200);
30</script>
31</body>
32</html>