2016-06-10 15:05
浏览 52


I need to know how to pass the date while loop through JavaScript to a popup page and put it inside a <P> tag on the popup window?

<div class="header-img" align="center">

<img src="header.png" width="300">

<div class="maincontent" align="right">
include 'config.php';

$sql = "SELECT * FROM de40v_subventions order by id desc";
$names = mysqli_query($con,$sql);
while($row = mysqli_fetch_array ($names)){

<table class="maintable" align="right" width="400px" dir="rtl"> 
<form name="form" method="post" action="delconfirm.php" onSubmit="return checknone();">
<td> <label> <b>الرقم: </b> </label> </td>
<td> <input type="text" value="<?php echo $row['id'] ?>" class="inputid" readonly/> </td>
<td> <label> <b>التاريخ والوقت: </b> </label> </td>
<td> <p> <?php echo date("Y-m-d H:m:s" , $row['datetime']); ?> </p> </td>
<td> <label> <b> الإسم كاملاً:</b> </label> </td>
<td> <p id="name"> <?php echo $row['firstname'] . ' ' . $row['fathername'] . ' ' . $row['grandfathername'] . ' ' . $row['familyname'] ?> </p> </td>
<td> <label> <b> رقم الهوية:</b> </label> </td>
<td> <p id="identity"> <?php echo $row['identity'] ?> </p> </td>


<script type="text/JavaScript">

function openprint(){

    var popupwin ="","طباعة البيانات","width=700, height=400");

    popupwin.document.writeln('<html><head><title>طباعة البيانات</title></head> <body> <center> <p id="printname"></p> </center> </body> </html>');
    popupname = popupwin.document.getElementById('printname').innerHTML;
    name = document.getElementById('name').innerHTML;
    popupname = name;


<?php } ?>
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题