Javascript examples for CSS Style Property:minWidth
Return the minimum width of a <p> element:
<!DOCTYPE html> <html> <body> <p style="background:red;min-width:600px;" id="myP">The minimum width of this paragraph is set to 600px.</p> <button type="button" onclick="myFunction()">Return min width</button> <script> function myFunction() {//w w w.j a v a 2s .c o m console.log(document.getElementById("myP").style.minWidth); } </script> </body> </html>