藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

請教問題

各位,請問有關於輸入顏色代碼出現相應的顏色的網站嗎?

[html]
<script>
function showc(){
try{
document.all("c").style.backgroundColor=document.all("i").value;
}
catch(e){
alert(e);
}

}

</script>
<div id=c style="width:200;height:200">color</div>
<input type=text id=i value="#FF0000">
<button onclick=showc()>show</button>
[/html]

???

非常感謝樓主,很好用




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com