你先可以在body中指定画该直线的区域比如一个表格的单元格中
<td> <p id= "aaa "> </p> </td>
然后再js中给aaa赋值就行了
var innerHTML_str= " ";
innerHTML_str= " <table border=\ "0\ " width=\ "100%\ " cellspacing=\ "0\ " cellpadding=\ "0\ " class=\ "table\ " > ";
innerHTML_str= " <v:line strokeweight=\ "2px\ " strokecolor=\ "red\ " from=\ "0px,0px\ " to=\ "100px,100px\ "> </v:line> ";
innerHTML_str= " </table> ";
aaa.innerHTML = innerHTML_str;
|