Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript">
- function setBG()
- {
- var img_path = unescape(document.URL.substring(document.URL.indexOf('?img=')+6,document.URL.length));
- document.body.style.backgroundImage="url("+img_path+")";
- document.body.style.backgroundColor="#f3f3f3";
- }
- </script>
- </head>
- <body>
- <h1>CSS Background Image<br /></h1>
- <button type="button" onclick="setBG()">Set background image</button>
- </body>
- </html>
Add Comment
Please, Sign In to add comment