<pre> <code> ไม่ทำงาน

เริ่มโดย affsom, 12 กรกฎาคม 2015, 09:28:58

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

affsom

tag <pre> กับ <code> มันไม่ทำงานครับ มันไม่แสดงออกมาเป็นcode เป็นเพราะอะไร ปกติก็ได้นะครับ งงเลย ลองกับทุกbrowserแล้วก็เหมือนกัน ลองสร้าง html เปล่าๆมาก็ไม่ได้ ทำยังไงครับ


<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
</head>
<body>




<pre>
<table>
<tr>
<td></td>
<td></td>
</tr>
</table>
</pre>

<code>
<table>
<tr>
<td></td>
<td></td>
</tr>
</table>
</code>


</body>
</html>


เกิดจากอะไรหว่า

zalapao23

หมายถึงคุณจะแสดง code html

<table>
<tr>
<td></td>
<td></td>
</tr>
</table>

บน ฺbrowser รึป่าวครับ

affsom

อ้างถึงจาก: zalapao23 ใน 12 กรกฎาคม 2015, 10:33:24
หมายถึงคุณจะแสดง code html

<table>
<tr>
<td></td>
<td></td>
</tr>
</table>

บน ฺbrowser รึป่าวครับ

ใช่ครับ

zalapao23

http://www.select2web.com/other/display-code-html.html

thaisew

ใช้ htmlspecialchars() อีกทางเลือก  :wanwan006:

affsom

<xmp>
   <b>bold</b>
   <ul>
     <li>list item</li>
  </ul>
</xmp>

ได้แล้วครับ ตามด้านบนไม่ต้องแปลงอะไร ออกมาตามต้นฉบับเลย