No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<body> | <body> | ||
<button onclick="myFunction()">Try it</button> | <button onclick="myFunction()">Try it</button> | ||
<script> | <script> | ||
function myFunction() { | function myFunction() { | ||
var x = document. | var x = document.getElementsByClassName("ts-inner"); | ||
if (x.style. | if (x.style.maxWidth === "none") { | ||
x.style. | x.style.maxWidth = "115em !important"; | ||
} else { | } else { | ||
x.style. | x.style.maxWidth = "none !important"; | ||
} | } | ||
} | } | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 13:21, 5 July 2023
<html> <body> <button onclick="myFunction()">Try it</button> <script> function myFunction() {
var x = document.getElementsByClassName("ts-inner"); if (x.style.maxWidth === "none") { x.style.maxWidth = "115em !important"; } else { x.style.maxWidth = "none !important"; }
} </script> </body> </html>