douzhulan1815 2015-09-26 22:57
浏览 26
已采纳

datepicker不在表单中工作

i've tried many datepicker plugins including the jQuery ui datepicker and many others but so far nothing works with my code....i need to add a datepicker to this form of mine...need a datepicker that works with this form..plz help..thanks

<html>
<head>
    <link rel="stylesheet" href="css/index.css" />
    <link rel="stylesheet" href="css/jquery-ui-1.11.4.css" />
    <script src="scripts/jquery-2.1.4.min.js"></script>
    <script src="scripts/jquery-ui-1.11.4.js"></script>
    <script src="scripts/form.js"></script>
</head>

<?php   
    include "header.php";
    include "menu.php";
?>

<body>

<?php
if(isset($_POST['inputcoursecode'],$_POST['inputname'],$_POST['inputid'],$_POST['inputdate'],$_POST['inputaddress'],$_POST['inputphn'],$_POST['inputemail'],$_POST['inputvouchercode']))
{    
    $course=$_POST['inputcoursecode'];
    $id=$_POST['inputid'];
    $nam=$_POST['inputname'];
    $bday=$_POST['inputdate'];
    $addr=$_POST['inputaddress'];
    $phn=$_POST['inputphn'];
    $eml=$_POST['inputemail'];
    $voucher=$_POST['inputvouchercode'];

    $c= mysql_connect("localhost","root","");
            mysql_select_db("project",$c);
$q= mysql_query("INSERT into applications (coursecode,id,name,birthday,address,phone,email,voucher) values('".$course."','".$id."','".$nam."','".$bday."','".$addr."','".$phn."','".$eml."','".$voucher."')");

    if($q)
    {
        header("Location:success.php");
    }
}
?>

<center>
<div id="regibody">

    <h2><u>Course Ragistration form</u></h2>


    <form id="regiform" name="f1" action="form.php" method="POST" enctype="multipart/form-data"  onsubmit="return confirm('Do you really want to submit the form?');">

        <table class="regitable">

            <tr><td>Course Code:</td>       <td><input type="text" name="inputcoursecode" onkeypress="return isAlpha()" required></td></tr>

            <tr><td>Name:</td>              <td><input type="text" name="inputname" onkeypress="return isAlpha()" required></td></tr>

            <tr><td>ID:</td>                <td><input type="text" name="inputid" onkeypress="return isNumberid()" required></td></tr>

            <tr><td>Date of Birth:</td>     <td><input type="text" id="inputdate" name="inputdate" required /></td></tr>

            <tr><td>Address:</td>           <td><textarea name="inputaddress" rows="10" cols=40" required></textarea></td></tr>

            <tr><td>Phone No:</td>          <td><input type="text" name="inputphn" onkeypress="return isNumberph()" required></td></tr>

            <tr><td>eMail:</td>             <td><input type="email" name="inputemail" required></td></tr>

            <tr><td>Voucher Code:</td>      <td><input type="text" name="inputvouchercode" onkeypress="return isNumbervc()" required></td></tr>

        </table>
        <br />
        <input type="submit" value="Submit">

    </form>

</div>    
</center>

<?php 
    include "footer.php";
?>

</body>
</html>
  • 写回答

1条回答 默认 最新

  • dongmeirang4679 2015-09-26 23:30
    关注
    <head>
        <link rel="stylesheet" href="css/index.css" />
        <link rel="stylesheet" href="css/jquery-ui-1.11.4.css" />
        <script src="scripts/jquery-2.1.4.min.js"></script>
        <script src="scripts/jquery-ui-1.11.4.js"></script>
        <script src="scripts/form.js"></script>
        <script>
        $(function() {
            $( "#inputdate" ).datepicker();
        });
        </script>
    </head>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 需要跳转番茄畅听app的adb命令
  • ¥50 寻找一位有逆向游戏盾sdk 应用程序经验的技术
  • ¥15 请问有用MZmine处理 “Waters SYNAPT G2-Si QTOF质谱仪在MSE模式下采集的非靶向数据” 的分析教程吗
  • ¥50 opencv4nodejs 如何安装
  • ¥15 adb push异常 adb: error: 1409-byte write failed: Invalid argument
  • ¥15 nginx反向代理获取ip,java获取真实ip
  • ¥15 eda:门禁系统设计
  • ¥50 如何使用js去调用vscode-js-debugger的方法去调试网页
  • ¥15 376.1电表主站通信协议下发指令全被否认问题
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证