進度條,顏色選取

<!-- lang: html -->
> <!DOCTYPE html> <html> <head>
<!-- lang: html -->
>     <title></title>
<!-- lang: html -->
> 
<!-- lang: html -->
> </head> <body> <input type="color" id="color"
<!-- lang: html -->
> onchange="color_change()"> <span id="currentColor"></span> <div
<!-- lang: html -->
> id="showcolor">color</div> <input id="range1" type="range" min=0
<!-- lang: html -->
> max=100 step=5 value=10 onchange="value_change()"> <output
<!-- lang: html -->
> id="output1">10</output> <script type="text/javascript">
<!-- lang: html -->
>     function value_change(){
<!-- lang: html -->
>         var number = document.getElementById("range1").value;
<!-- lang: html -->
>         document.getElementById("output1").value = number;
<!-- lang: html -->
>     }
<!-- lang: html -->
> 
<!-- lang: html -->
>     function color_change(){
<!-- lang: html -->
>         document.getElementById("showcolor").style.background =document.getElementById("color").value;
<!-- lang: html -->
>     } </script> </body> </html>

可是不知道如何在IE8及一下如何顯示javascript

相關文章
相關標籤/搜索