我收到此错误:第一个错误:未捕获 SyntaxError:意外令牌} => jquery-1.9.1.min.js:3 现在错误显示:未捕获语法错误:意外令牌} =>fase1_manual.php?lic=1:15
但是当我看他们说的地方时,我没有看到任何错误......
在我的页面上,我使用的唯一 jquery 是:
<script type="text/javascript">
$(document).ready(function () {
$('#mydate').click(function() {
$('#mydate').datebox('open');
});
});
</script>
我使用 jQuery Mobile 日期框。
提交表单时,似乎看不出有什么问题,使我的页面不时冻结。感谢任何可以提供帮助的人!
整个页面:
<?php
session_start();
include("connections.php");
$nameErr = $fnameErr = $bdErr = "";
$name = $fname = $bday = "";
if (isset($_GET["submit"]) && !empty($_GET['submit']))
{
if (empty($_GET["patname"])) {
$nameErr = "Mag niet leeg zijn";
}
else {
$name = cleanValue($_GET["patname"]);
if(preg_match("/^[a-zA-Z -]+$/",$name))
{
$nameErr ="";
}
else
{
$nameErr = "Moet enkel uit letters bestaan";
}
}
if (empty($_GET["patfname"])) {
$fnameErr = "Mag niet leeg zijn";
}
else {
$fname = cleanValue($_GET["patfname"]);
if(preg_match("/^[a-zA-Z -]+$/",$fname))
{
$fnameErr="";
}
else
{
$fnameErr = "Moet enkel uit letters bestaan";
}
}
if (empty($_GET["birthdate"])) {
$bdErr = "Mag niet leeg zijn";
}
else {
$bday = cleanValue($_GET["birthdate"]);
$bdErr="";
}
if ( $fnameErr === '' && $nameErr === '' && $bdErr === '') {
$destination_url = "fase1.php?patfname=$fname&patname=$name&birthdate=$bday&lic=".$_SESSION['lic_key'];
header("Location:$destination_url");
exit();
}
}
include("header.php");
?>
<div id="div-header-fullwidth">
<p>MediQueue Registratie APP: FASE 1 - Zelfregistratie</p>
</div>
<div id="div-content-fullwidth">
<div id="div-container">
<div id="div-logo">
<p>
<img src="http://mediqueue.newworld02.be/iris/registration/img/logo.png" width="129" height="158" id="logo" alt="logo" />
</p>
</div>
<div id="div-form">
<form id="test" method="get" action="<?php echo $_SERVER['PHP_SELF'];?>">
<table>
<tr>
<td>
<label for="patfname" class="ui-input-text">Voornaam:</label>
</td>
<td>
<input type="text" id="patfname" name="patfname" value="<?=$fname?>"/>
</td>
<td class="error">
<?php echo $fnameErr;?>
</td>
</tr>
<tr>
<td>
<label for="patname" class="ui-input-text">Achternaam:</label>
</td>
<td>
<input type="text" id="patname" name="patname" value="<?=$name?>"/>
</td>
<td class="error">
<?php echo $nameErr;?>
</td>
</tr>
<tr>
<td>
<label for="mydate" class="ui-input-text">Geboortedatum:</label>
</td>
<td>
<input name="birthdate" id="mydate" value="<?=$bday?>" data-role="datebox" data-options='{"mode": "datebox", "beforeToday": true, "minYear": 1900, "overrideDateFieldOrder": ["d","m","y"], "overrideDateFormat": "%Y-%m-%d", "lockInput": true, "centerHoriz": true}' readonly="readonly"/>
</td>
<td class="error">
<?php echo $bdErr;?>
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Registreer" data-theme="a"/>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#mydate').click(function() {
$('#mydate').datebox('open');
});
});
</script>
<?
include("footer.php");
?>