View Full Version : Hiển thị code lên web
Mình thấy có nhiều trang web hiển thị code lên web hoặc
lên <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
Vậy làm thế nào các bác biết hướng dẫn giúp
Thanks
bvnguyen
18-10-2010, 22:49
đó là html special character, hoặc view source chính câu hỏi của bạn ra là sẽ thấy
danthanh.aweb
18-10-2010, 22:51
Dùng hàm str_replace để thay dấu < và > thành < >
Hoặc dùng htmlspecialchars(string);
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
Mình muốn hiển thị như trang này( phần bên trái) code
http://www.w3schools.com/css/tryit.asp?filename=trycss_background-color_body
và
có thể hiển thị code lên web
những thẻ có <html>...
thanks
satthudatinh011
22-10-2010, 13:15
đặt trong thẻ <code> là ra
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.