Home > Web Front-end > JS Tutorial > JS line drawing (example code)_javascript skills

JS line drawing (example code)_javascript skills

WBOY
Release: 2016-05-16 17:13:55
Original
1274 people have browsed it

IE下画线

复制代码 代码如下:




 
 


from='200,200' 
to='300,100' 
style='position:absolute;z-index:8'> 
 

<script><br>var R =function(){};<br>R.prototype.createLine = function (startX,startY,endX,endY){  <br>  var le = document.createElement( "<v:line><v:line>" );  <br>  le.from = startX ',' startY ;  <br>  le.to = endX ',' endY ;  <br>  le.strokecolor= "red" ;  <br>  le.strokeweight= "1pt" ;  <br>  return le;  <br>}  <br>var d =new R();<br>document.body.appendChild(d.createLine(1,1,200,100));<br></script>


FF下画线
复制代码 代码如下:


 
  A canvas fillRect, strokeRect and clearRect example
 
 
 
 
 

 
 


 
 

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template