我在iframe(pg3_1.php)中打开了一个带有fancybox的表单。表单未提交信息。
的index.html:
$(document).ready(function() {
$('.fancybox').fancybox();
});

<body>
<div class="span12">
<b>Corredor Seleccionado:</b><br>
<iframe width="820" height="615" src="pg3_1.php" frameborder="0" name='rightside'></iframe>
</div>
</body>
&#13;
pg3_1.php页面是:
$(document).ready(function() {
//$('#abrirdiv').fancybox();
$('.fancybox').fancybox();
});
&#13;
<body>
<a href='form.php' class='fancybox fancybox.ajax'><button class='btn btn-success' style='float: right;' id='boton'><i class='icon-plus'></i> <strong>Button</strong></button></a>
</body>
&#13;
表格(form.php):
function askforsendingform() {
if (confirm('are you sure?')) {
document.form.submit()
}
}
&#13;
<body>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
?>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" role="form" name="form">
<div class="span5">
<label for="time">time</label>
<input type="time" name="initialtime" value="">
<input type="button" name="submit" value="Enviar" class="btn btn-default" onclick="askforsending()">
</div>
</form>
<?php
} elseif ($_SERVER['REQUEST_METHOD']=='POST') {
$time = $_POST['initialtime'];
$sql="INSERT INTO tabletime (time) VALUES ('$time')";
mysql_query($sql3) or die(mysql_error());
?>
</body>
&#13;
我没有提交,控制台中没有错误显示,提前感谢