所以我有这个代码:
<?php
echo "<textarea style='width:500px; height:600px'>";
while($extract = $result->fetch_array())
{
echo "<span class='usr'>" . $extract['usr'] . "</span>: <span class='msg'>" . $extract['msg'] . "</span><br/>";
}
echo "</textarea>";
$result->close();
$conexion->close();
?>
文本区域的输出给我的是:
<span class='usr'>dsdsds</span>: <span class='msg'>aaaaa</span><br/>
不能在<textarea>
中使用HTML代码来呈现HTML。
在文本区域中呈现HTML