Javascript DOM CSS Style clear Property get

Introduction

Return the clear property:

alert(document.getElementById("myP").style.clear);

View in separate window

<!DOCTYPE html>
<html>
<body>

<img style="float:left;" src="image1.png" width="100" height="132">

<p id="myP" style="clear:left;">This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>

<button type="button" onclick="myFunction()">Return the value of the clear property</button>

<p id="demo"></p>


<script>
function myFunction() {//  w ww . j a v a 2  s  . c om
  document.getElementById("demo").innerHTML = document.getElementById("myP").style.clear;
}
</script>

</body>
</html>



PreviousNext

Related