Javascript examples for CSS Style Property:whiteSpace
Return the whiteSpace property
<!DOCTYPE html> <html> <body> <div id="myDiv" style="white-space:nowrap;"> 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. 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. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div>// ww w. j a v a2s. com <br> <button type="button" onclick="myFunction()">Return the whiteSpace property</button> <script> function myFunction() { console.log(document.getElementById("myDiv").style.whiteSpace); } </script> </body> </html>