Web Developer's Room
HOME > DHTML サンプル集 > 基本編     

基本編

テキストボックス選択時に背景色を変える

<html>
<body>

<input type="text" value="テキスト1" onfocus="this.style.backgroundColor='#cccccc'" onblur="this.style.backgroundColor='#ffffff'">
<input type="text" value="テキスト2" onfocus="this.style.backgroundColor='#cccccc'" onblur="this.style.backgroundColor='#ffffff'">

</body>
</html>

 サンプル




スポンサードリンク


(C) Web Developer's Room All rights reserved.