如何将数据/记录从html表单保存到DB2数据库

时间:2014-10-28 14:24:22

标签: windows db2

这是我的html表单

<form class="form-horizontal"  id="myCredantials" >

    <div class="form-group">
        <label class="col-sm-2 control-label">Username : </label>
            <div class="col-sm-10 col-md-2">
                <input type="text" class="form-control" id="tbUsername" placeholder="Username">
            </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">Email : </label>
            <div class="col-sm-10 col-md-2">
                <input type="text"  class="form-control" id="tbEmail" placeholder="Email">
            </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">Gender : </label>
            <div class="col-sm-10 col-md-2">

                <select id="cbmGender">
                <option value="-1">Gender</option>
                <option value="Male">Male</option>
                <option value="Female">Female</option>
                </select>
            </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">Date : </label>
            <div class="col-sm-10 col-md-2">
                <input type="text" class="form-control" id="tbDate">
            </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">Price : </label>
            <div class="col-sm-10 col-md-2">            
                    <input type="text"  class="form-control" value="0"  id="tbPrice" placeholder="Prices">
            </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">Perc % : </label>
            <div class="col-sm-10 col-md-2">            
                    <input type="text"  class="form-control" value="0"  id="tbPercentage" placeholder="%">
            </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">Password : </label>
            <div class="col-sm-10 col-md-2">
                <input type="password" class="form-control" id="tbPassword" placeholder="Password">
            </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">Confirm Password : </label>
            <div class="col-sm-10 col-md-2">
                <input type="password"  class="form-control" id="tbConfirmpassword" placeholder="Confirm">
            </div>
    </div>


    <div class="form-group">

            <div class="col-sm-offset-2 col-sm-10">
                <input type="button" class="btn btn-primary " id="btnSubmit" onclick="onSave()" value="Save" >
                <input type="button" class="btn btn-primary " id="btnClear" onclick="onClearError()" value="Remove Error" >
                <input type="button" class="btn btn-primary " id="btnGet" onclick="doGet()" value="Get" >
                <input type="button" class="btn btn-primary " id="btnGet" onclick="doPost()" value="Post" >
            </div>

    </div>
    <div style="width:700px;">
    <table  cellpadding="0" cellspacing="0" border="0" width="700"  id="tbl_Credantials">

        </table>

    </div>

    </form>

0 个答案:

没有答案