html - Is it possible to make <script> tags visible? -
i make script
tag visible. possible?
i don't know why want that, simple css should trick:
<!doctype html> <head> <title>sample page</title> <style type="text/css"> script { display:block; } </style> </head> <body> <script type="text/javascript"> (var = 0; < 10; i++) { console.log("why?"); } </script> </body>
https://jsfiddle.net/0v2wo3a2/
edit: if script in <head>
, you'll have make head visible, too:
<style type="text/css"> head, script { display:block; } </style>
also, mike pointed out in comments, looking option:
<script type="text/javascript"><br/> for (var = 0; < 10; i++) {<br/> console.log("why?");<br/> }<br/> </script>
this looks bad, more self explanitory in fiddle: https://jsfiddle.net/0v2wo3a2/1/
Comments
Post a Comment