Javascript examples for CSS Style Property:clip
Get the clip property:
<!DOCTYPE html> <html> <body> <button type="button" onclick="myFunction()">Return the value of the clip property</button><br> <img id="myImg" style="position:absolute;clip:rect(0px,60px,200px,0px);" src="http://java2s.com/resources/c.png" width="100" height="132"> <script> function myFunction() {//from w ww. ja v a 2s . co m console.log(document.getElementById("myImg").style.clip); } </script> </body> </html>