<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD> <script Language="javascript">
function a(x,y,color)
{document.write("<img border='0' style='position: absolute; left: "+(x+20)+"; top: "+(y+20)+";background-color: "+color+"' src='px.gif' width=1 height=1>")}
</script> <body leftmargin=20 topmargin=20>
<TABLE border=0 bgcolor="000000" cellspacing="1" width=400>
<TR bgcolor="FFFFFF">
<TD id="td1"> </TD>
<TD>张三</TD>
<TD>李四</TD>
<TD>王五</TD>
</TR>
<TR bgcolor="FFFFFF">
<TD>数学</TD>
<TD>55</TD>
<TD>66</TD>
<TD>77</TD>
</TR>
<TR bgcolor="FFFFFF">
<TD>英语</TD>
<TD>99</TD>
<TD>68</TD>
<TD>71</TD>
</TR>
<TR bgcolor="FFFFFF">
<TD>语文</TD>
<TD>33</TD>
<TD>44</TD>
<TD>55</TD>
</TR>
</TABLE>
<script>
function line(x1,y1,x2,y2,color)
{
var tmp
if(x1>=x2)
{
tmp=x1;
x1=x2;
x2=tmp;
tmp=y1;
y1=y2;
y2=tmp;
}
for(var i=x1;i<=x2;i++)
{
x = i;
y = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
a(x,y,color);
}
}
//line(1,1,100,100,"000000");
line(td1.offsetLeft,td1.offsetTop,td1.offsetLeft+td1.offsetWidth,td1.offsetTop+td1.offsetHeight,'#000000')
</script>
</BODY>
</HTML>
这是个在单元格了加对角线的代码,小弟想问一下,在对角线分开的上下部分加入字体,如上部分是课程,下部分是分数,怎么做啊??
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD> <script Language="javascript">
function a(x,y,color)
{document.write("<img border='0' style='position: absolute; left: "+(x+20)+"; top: "+(y+20)+";background-color: "+color+"' src='px.gif' width=1 height=1>")}
</script> <body leftmargin=20 topmargin=20>
<TABLE border=0 bgcolor="000000" cellspacing="1" width=400>
<TR bgcolor="FFFFFF">
<TD id="td1"> </TD>
<TD>张三</TD>
<TD>李四</TD>
<TD>王五</TD>
</TR>
<TR bgcolor="FFFFFF">
<TD>数学</TD>
<TD>55</TD>
<TD>66</TD>
<TD>77</TD>
</TR>
<TR bgcolor="FFFFFF">
<TD>英语</TD>
<TD>99</TD>
<TD>68</TD>
<TD>71</TD>
</TR>
<TR bgcolor="FFFFFF">
<TD>语文</TD>
<TD>33</TD>
<TD>44</TD>
<TD>55</TD>
</TR>
</TABLE>
<script>
function line(x1,y1,x2,y2,color)
{
var tmp
if(x1>=x2)
{
tmp=x1;
x1=x2;
x2=tmp;
tmp=y1;
y1=y2;
y2=tmp;
}
for(var i=x1;i<=x2;i++)
{
x = i;
y = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
a(x,y,color);
}
}
//line(1,1,100,100,"000000");
line(td1.offsetLeft,td1.offsetTop,td1.offsetLeft+td1.offsetWidth,td1.offsetTop+td1.offsetHeight,'#000000')
</script>
</BODY>
</HTML>
这是个在单元格了加对角线的代码,小弟想问一下,在对角线分开的上下部分加入字体,如上部分是课程,下部分是分数,怎么做啊??
<HTML xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<link rel="File-List" href="index_files/filelist.xml">
<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]--><!--[if gte mso 9]>
<xml><o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]-->
</HEAD> <script Language="javascript">
function a(x,y,color)
{document.write(" <img border='0' style='position: absolute; left: "+(x+20)+"; top: "+(y+20)+";background-color: "+color+"' src='px.gif' width=1 height=1>")}
</script> <body leftmargin=20 topmargin=20>
<TABLE border=0 bgcolor="000000" cellspacing="1" width=400>
<TR bgcolor="FFFFFF">
<TD id="td1"> </TD>
<TD id="td1"> qw<!--[if gte vml 1]><v:line id="_x0000_s1028"
style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="15.75pt,16.5pt"
to="90pt,42.75pt"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;left:20px;top:21px;width:101px;height:37px'><img
width=101 height=37 src="index35_files/image001.gif" v:shapes="_x0000_s1028"></span><![endif]></TD>
<TD rowspan="2">张三 </TD>
<TD rowspan="2">李四 </TD>
<TD rowspan="2">王五 </TD>
</TR>
<TR bgcolor="FFFFFF">
<TD id="td1" width=47> 12 </TD>
<TD id="td1" width=47> </TD>
</TR>
<TR bgcolor="FFFFFF">
<TD colspan="2">数学 </TD>
<TD>55 </TD>
<TD>66 </TD>
<TD>77 </TD>
</TR>
<TR bgcolor="FFFFFF">
<TD colspan="2">英语 </TD>
<TD>99 </TD>
<TD>68 </TD>
<TD>71 </TD>
</TR>
<TR bgcolor="FFFFFF">
<TD colspan="2">语文 </TD>
<TD>33 </TD>
<TD>44 </TD>
<TD>55 </TD>
</TR>
</TABLE>
<script>
function line(x1,y1,x2,y2,color)
{
var tmp
if(x1>=x2)
{
tmp=x1;
x1=x2;
x2=tmp;
tmp=y1;
y1=y2;
y2=tmp;
}
for(var i=x1;i <=x2;i++)
{
x = i;
y = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
a(x,y,color);
}
}
//line(1,1,100,100,"000000");
line(td1.offsetLeft,td1.offsetTop,td1.offsetLeft+td1.offsetWidth,td1.offsetTop+td1.offsetHeight,'#000000')
</script>
</BODY>
</HTML> 瞎弄的,不知道合不合适.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head><script language="javascript">
function a(x, y, color)
{ document.write("<img border='0' style='position: absolute; left: " + (x + 20) + "; top: " + (y + 20) + ";background-color: " + color + "' src='px.gif' width=1 height=1>") }
</script><body leftmargin="20" topmargin="20">
<table border="0" bgcolor="000000" cellspacing="1" width="400">
<tr bgcolor="FFFFFF">
<td id="td1">
<table style="width:100%">
<tr>
<td style="width:50%">
</td>
<td style="width:50%">
姓名</td>
</tr>
<tr>
<td style="width:50%">
课程</td>
<td style="width:50%">
</td>
</tr>
</table>
</td>
<td>
张三
</td>
<td>
李四
</td>
<td>
王五
</td>
</tr>
<tr bgcolor="FFFFFF">
<td>
数学
</td>
<td>
55
</td>
<td>
66
</td>
<td>
77
</td>
</tr>
<tr bgcolor="FFFFFF">
<td>
英语
</td>
<td>
99
</td>
<td>
68
</td>
<td>
71
</td>
</tr>
<tr bgcolor="FFFFFF">
<td>
语文
</td>
<td>
33
</td>
<td>
44
</td>
<td>
55
</td>
</tr>
</table> <script>
function line(x1, y1, x2, y2, color)
{
var tmp
if (x1 >= x2)
{
tmp = x1;
x1 = x2;
x2 = tmp;
tmp = y1;
y1 = y2;
y2 = tmp;
}
for (var i = x1; i <= x2; i++)
{
x = i;
y = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
a(x, y, color);
}
}
//line(1,1,100,100,"000000");
line(td1.offsetLeft, td1.offsetTop, td1.offsetLeft + td1.offsetWidth, td1.offsetTop + td1.offsetHeight, '#000000')
</script></body>
</html>