Friday, November 8, 2013

CONTOH FORM di HTML

<!DOCTYPE HTML>
<html>
<body>
    <form>
        <fieldset>
            <legend>Data Karyawan</legend>
           
            <!-- contoh untuk field text -->
            <label for="nama">Nama :</label>
            <input type="text"
                   name="nama"
                   id="nama"   
                   size="100"
                   maxlength="10"
                   placeholder="First name"
                   autofocus >
                   <!-- value= -->
                   <!-- autocomplete="off" -->
                   <!-- disabled -->
                   <!-- form="form1" -->
                   <!-- pattern="[A-Za-z]{3}" -->
                   <!-- readonly -->
                   <!-- required -->
           
            <br/>
            <!-- Contoh untuk field numerik -->
            <label for="umur">umur:</label>   
            <input type="number"
                   name="umur"
                   id="umur"   
                   size="100"
                   maxlength="10"
                   placeholder="umur"
                   min="10"
                   max="100"
                   step="3"
                   >
                   <!-- value= -->
                   <!-- autofocus -->
                   <!-- autocomplete="off" -->
                   <!-- disabled -->
                   <!-- form="form1" -->
                   <!-- readonly -->
                   <!-- required -->
           
            <!-- contoh untuk field file -->
            <br/>
            <label for="file">Pilih File :</label>   
            <input type="file"
                   name="file"
                   id="file"
                   accept="image/*"
            >
            <br/><br/>
            <!-- contoh untuk mendefinisikan gambar sebagai submit button-->
            <input type="image"
                   src="img_submit.gif"
                   alt="Submit"
                   width="48"
                   height="48"
            >

            <!-- accept="audio/*|video/*|image/*|MIME_type" -->
            <br/>
            <input type="submit">
        </fieldset>
     </form>
    </body>
</html>

No comments:

Post a Comment