Bài này mình thấy cũng có nhiều blog giới thiệu qua rồi nên không muốn nhắc lại thêm nữa.
Vẫn là sử dụng hàm Replace cho comments và comments holder để hiển thị các innerHTML
Tính năng: Áp dụng cho toàn bộ comment và thread comment.
Các bước thêm vào blogger của bạn :
Mở chế độ chỉnh sửa HTML.
Tìm khóa </body>
Thêm trước đó code sau (code hoàn toàn không mã hóa để mọi người có thể chỉnh sửa theo ý mình) :
Minh Anh - Erhay. Vui lòng ghi rõ nguồn Erhay khi bạn phát hành thông tin từ trang này.
Vẫn là sử dụng hàm Replace cho comments và comments holder để hiển thị các innerHTML
Tính năng: Áp dụng cho toàn bộ comment và thread comment.
Các bước thêm vào blogger của bạn :
Bước 1:
Mở chế độ chỉnh sửa HTML.
Bước 2 :
Tìm khóa </body>
Bước 3 :
Thêm trước đó code sau (code hoàn toàn không mã hóa để mọi người có thể chỉnh sửa theo ý mình) :
<script type='text/javascript'>
//<;
if (a) {
b = a['getElementsByTagName']('DD');
for (i = 0; i < b['length']; i++) {
erhaystr = b['item'](i)['innerHTML'];
replaceneechal();
b['item'](i)['innerHTML'] = erhaystr;
};
};
c = document['getElementById']('comment-holder');
if (c) {
erhaystr = c['innerHTML'];
replaceneechal();
c['innerHTML'] = erhaystr;
};
function replaceneechal() {
erhaystr = erhaystr['replace'](/\〈/gi, '<');
erhaystr = erhaystr['replace'](/\〉/gi, '>');
erhaystr = erhaystr['replace'](/\[img\]/gi, '<img src=\'');
erhaystr = erhaystr['replace'](/\[img\#\]/gi, '<img width=\'100%\' src=\'');
erhaystr = erhaystr['replace'](/\[\/img\]/gi, '\' class=\'image\'/>');
erhaystr = erhaystr['replace'](/\[ma\]/gi, '<marquee>');
erhaystr = erhaystr['replace'](/\[\/ma\]/gi, '</marquee>');
erhaystr = erhaystr['replace'](/\[si\=\"/gi, '<font size=\'');
erhaystr = erhaystr['replace'](/\[\/si\]/gi, '</font>');
erhaystr = erhaystr['replace'](/\[co=\"/gi, '<font color=\'');
erhaystr = erhaystr['replace'](/\[\/co\]/gi, '</font>');
erhaystr = erhaystr['replace'](/\"\]/gi, '\'>');
erhaystr = erhaystr['replace'](/\[ce\]/gi, '<center>');
erhaystr = erhaystr['replace'](/\[\/ce\]/gi, '</center>');
erhaystr = erhaystr['replace'](/\[ma\+\]/gi, '<marquee direction=\'right\'>');
erhaystr = erhaystr['replace'](/\[\/ma\+\]/gi, '</marquee>');
erhaystr = erhaystr['replace'](/\[box\]/gi, '<table frame=\'box\'><tr><td>');
erhaystr = erhaystr['replace'](/\[\/box\]/gi, '</td></tr></table>');
erhaystr = erhaystr['replace'](/\[mark\]/gi, '<table align=\'center\' frame=\'vsides\' width=\'70%\'><tr align=\'center\'><td>');
erhaystr = erhaystr['replace'](/\[\/mark\]/gi, '</td></tr></table>');
erhaystr = erhaystr['replace'](/\[line\]/gi, '<hr/>');
erhaystr = erhaystr['replace'](/\[card\=\"/gi, '<table align=\'center\' border=\'1\' width=\'75%\'><tr><td align=\'center\' bgcolor=\'');
erhaystr = erhaystr['replace'](/\[\/card\]/gi, '</td></tr></table>');
erhaystr = erhaystr['replace'](/\[hi\=\"/gi, '<span style=\'background-color:');
erhaystr = erhaystr['replace'](/\[\/hi\]/gi, '</span>');
erhaystr = erhaystr['replace'](/:d/gi, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/4.gif'/>");
erhaystr = erhaystr['replace'](/:p/gi, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/10.gif'/>");
erhaystr = erhaystr['replace'](/:\)\)/, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/21.gif'/>");
erhaystr = erhaystr['replace'](/:x/gi, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/8.gif'/>");
erhaystr = erhaystr['replace'](/:\)/, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/1.gif'/>");
erhaystr = erhaystr['replace'](/:\(\(/, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/20.gif'/>");
erhaystr = erhaystr['replace'](/:\(/, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/2.gif'/>");
erhaystr = erhaystr['replace'](/:s/gi, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/17.gif'/>");
erhaystr = erhaystr['replace'](/=\)\)/, "<img src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/24.gif'/>");
};
//]]>
</script>
Minh Anh - Erhay. Vui lòng ghi rõ nguồn Erhay khi bạn phát hành thông tin từ trang này.

- Rất vui khi được mọi người nhận xét, đóng góp ý kiến để bài viết chất lượng hơn.
- Các ý kiến mang nội dung xấu, tính chất spam, chia rẽ, vi phạm sẽ bị xóa mà không nhắc nhở.
- Comment và share bài viết nếu bạn cảm thấy hay và thú vị.
- Không quên ghi lại nguồn erhay khi bạn phát hành lại thông tin từ trang này.