Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Background color wrapper for clear image tests</title>
5 <style>
6 img {
7 background-color: rgb(0, 255, 0);
8 }
9 </style>
10 </head>
11 <body>
12 <img id="image1">
13 <script>
14 // Loads an externally specified image and displays it
15 // with a green background. Intended for use with tests
16 // involving clear images.
18 // Use as "green-background.html?image.png".
20 // Get the image URL.
21 var imgURL = document.location.search.substr(1);
23 // Load it.
24 var img = document.images[0];
25 img.src = imgURL;
26 </script>
27 </body>
28 </html>