用PHP进行JavaScript数据交换?

时间:2018-08-16 10:36:56

标签: php jquery

<?php
$soruidal=$rowget["id"];
$resultsr = mysqli_query($con,"select * from mulakat where id=$soruidal");
$row=mysqli_fetch_array($resultsr,MYSQLI_ASSOC);
?>
<script>
if(<?php $row["right"]; ?> == html( $( "input:checked" ).val());)
{
    document.write("<?php echo'<p id="p3" style="display: none;font-size: 35px;color: white;background-color: #00a70d;">false answer: '.$row["right"].'</p>'; ?>");
}
else{
    document.write("<?php echo '<p id="p3" style="display: none;font-size: 35px;color: white;background-color: #a70000;">right answer: '.$row["right"].'</p>'; ?>");
}
</script>

如果操作正确,我想变绿。使用jQuery示例网站phpden中的值:https://www.katipler.name.tr/mulakat/?soru=1

0 个答案:

没有答案