PHP & JavaScript Room :: 設置サンプル

実行結果

ソース

<style type="text/css">
    input.userid {
        padding-left:20px;
        background:#ffffff url(/content/img/icon/color/user.gif) no-repeat left center;
        width:100px;
    }
    input.password {
        padding-left:20px;
        background:#ffffff url(/content/img/icon/color/login.gif) no-repeat left center;
        width:100px;
    }
    input.submit {
        width:45px; height:20px;
        background:url(/content/img/css/btn_login.gif) no-repeat center;
    }
</style>

<form action="#" onsubmit="alert('サンプルのため送信はしません'); return false;">
    <p>
        <input type="userid" class="userid" size="20" maxlength="10" /> 
        <input type="password" class="password" size="20" maxlength="10" /> 
        <input type="submit" class="submit" value="" /><!-- ボタン用の背景画像使用のためvalueは空に! -->
    </p>
</form>

polarized women