que"/> que">
关于回复功能
数据库读取出的回复内容:
$sql="select * from massage where iid=$iid order by mid desc limit $offset,$pagesize";<br />$result=$db->query($sql);<br />while (($row=$result->fetch_assoc())!=false) {<br /> <br /> echo '<div id="msg"><br /> <table width="800" height="auto" border="0" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFFFF"><br /> <tr><br /> <th scope="row" width="100" align="center"><strong id="mid">#'.$row["mid"].'</strong><br /><a href="data.php">'.$row["author"].'</a></th><br /> <td><p id="msgten">'.$row["msg"].'</p><span><a href="#msgcon" onclick="toCopy();">回复</a>'.$row["time"].'</span></td><br /> </tr><br /> </table><br /> </div>';<br />}
<script><br /> function toCopy(){<br /> var midval= document.getElementById("mid").innerHTML;<br /> var msg= document.getElementById("msgten").innerHTML;<br /> document.getElementById("msgcon").value = "回复"+midval+"楼"+"["+msg+"]";<br /> document.getElementById("msgcon").focus();<br /> }<br /></script>
<br />$sql="select * from massage where iid=$iid order by mid desc limit $offset,$pagesize";<br />$result=$db->query($sql);<br />$i = 0;<br />while (($row=$result->fetch_assoc())!=false) {<br /> <br /> echo '<div id="msg'.$i.'"><br /> <table width="800" height="auto" border="0" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFFFF"><br /> <tr><br /> <th scope="row" width="100" align="center"><strong id="mid'.$i.'">#'.$row["mid"].'</strong><br /><a href="data.php">'.$row["author"].'</a></th><br /> <td><p id="msgten'.$i.'">'.$row["msg"].'</p><span><a href="#msgcon" onclick="toCopy('.$i.');">回复</a>'.$row["time"].'</span></td><br /> </tr><br /> </table><br /> </div>';<br /><br /> $i++;<br />}<br />
<br /><script><br /> function toCopy(c){<br /> var midval= document.getElementById("mid"+c).innerHTML;<br /> var msg= document.getElementById("msgten"+c).innerHTML;<br /> document.getElementById("msgcon").value = "回复"+midval+"楼"+"["+msg+"]";<br /> document.getElementById("msgcon").focus();<br /> }<br /></script><br />