ขอความช่วยเหลือ js ครับ

เริ่มโดย zatoli30, 13 สิงหาคม 2012, 23:14:49

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

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

zatoli30

คือว่าผมจะแปลงโค้ด ascii แบบนี้

<a href="#">Mycomsci</a>'; ให้ออกมาเป็นแบบนี้ ไม่ทราบต้องทำยังไงครับ

<a href="#">Mycomsci</a> นั่งงมมานานแล้วครับ ปล.มือใหม่ครับ

ขอบคุณครับ  :wanwan017: :wanwan017:
รับเขียนสคริปเก็บข้อมูลสินค้า ตามสั่ง Nordstrom,6pm,Zappos,Homedepot,etc...  [direct=https://www.facebook.com/MR.watcharaporn]สอบถาม[/direct]

@@@

ใช้ unescape

<script language="javascript">document.write(unescape('&lt;a href=&quot;#&quot;&gt;Mycomsci&lt;/a&gt;'))</script>
รับซื้อเว็บ 100uip ต่อวันขึ้นไป [direct=http://www.rommit.com/forex]EA Forex[/direct]

zatoli30

รับเขียนสคริปเก็บข้อมูลสินค้า ตามสั่ง Nordstrom,6pm,Zappos,Homedepot,etc...  [direct=https://www.facebook.com/MR.watcharaporn]สอบถาม[/direct]

xvlnw.com

#3

this function

<?php 
function htmlkarakter($string

   
$string str_replace(array("&lt;""&gt;"'&amp;'''', '&quot;','&lt;', '&gt;'), array("<", ">",'&',''','"','<','>'), htmlspecialchars_decode($stringENT_NOQUOTES)); 

       return 
$string
   

?>



Before
<description>&lt;div class=&quot;google-ad1&quot;&gt;
  &lt;script type='text/javascript'&gt;
    GA_googleFillSlot(&quot;EW_News_300x250&quot;);
  &lt;/script&gt;

&lt;/div&gt;

after using the function

<div class="google-ad1">
  <script type='text/javascript'>
    GA_googleFillSlot("EW_News_300x250");
  </script>

Edit: อ่านเพิ่มเติม
http://www.php.net/manual/en/function.htmlspecialchars-decode.php
ส่วนนี้สำหรับ PHP นะครับ เสริมไว้ให้
[direct=https://cloudhost.in.th/wordpress-hosting]ツ ⓌⓄⓇⒹⓅⓇⒺⓈⓈ ⒽⓄⓈⓉⒾⓃⒼ [/direct] :wanwan014:  :D
[direct=https://cloudhost.in.th/cloudhosting.html]Cloud Hosting[/direct] [direct=https://cloudhost.in.th/cloudvps.html]Cloud Server[/direct] [direct=https://cloudhost.in.th/vpshosting.html]Cloud VPS Hosting[/direct] [direct=https://cloudhost.in.th/windowsvps.html]Cloud Windows[/direct] Tel: 080-348-0843 LINE: ixvlnw