我的疑问是如果我有
这些div标签使用jquery使用过渡效果隐藏我想在结果中获得div 1 2 3的结果
1 div
<div id="1">
</div>
2 div
<div id="2">
</div>
3 div
<div id="3">
</div>
<input type="submit" name="first-sudmit" value="NEXT" onclick="result(this.value)" />
</div>
<div id="result">
result
</div>
在js中:
<script type="text/javascript">
function showResult()
{
alert("dfadsfdasf");
xmlhttp.open("GET","result.php?q="+str,true);
xmlhttp.send();
}
</script>
我什至也尝试过序列化.....没有运行php脚本
喜欢
js:
<script type="text/javascript">
function showFormData(oForm) {
var msg = "The data that you entered for the form with 'name' attribute='" + oForm.name + "': \n";
submitHandler: function(form) {
// do other stuff for a valid form
$.post('result.php', $("#submit_drop,#submit_radio,#submit_check,#submit_text,#submit_drag_text,#submit_drag_img").serialize(), function(data) {
$('#results').html(data);
});
alert(msg);
}
</script>
php:
//page1 process
if(!ekpty($_POST['first-submit']))
{
$first1=$_POST['drop1'];
$first2=$_POST['drop2'];
$first3=$_POST['drop3'];
$first4=$_POST['drop4'];
$first5=$_POST['drop5'];
for(i=0;i<=4;i++)
{
$sql="INSERT INTO $score1(correct)VALUES('$first[i]')";
}
}
else
{
print '<script type="text/javascript">';
print 'alert("page 1 no answer is attempted")';
print '</script>';
}
//output resu;ts
$sql="SELECT count(chkpt) from score1 where chkpt='1'";
echo $sql;
那么现在如何在最后一个结果 div 标签中获取这些表单的结果.......
请一些人回答这个......