Karena cukup penting keberadaannya, maka kali ini Beben si bloglang anu ganteng kalem tea akan membahas bagaimana memasukan script for convert berada dekat dengan kotak komentar, supaya tidak jauh/bolak-balik kalau mau mengconvert kode agar bisa tampil dipost kotak komentar kita :-bd (roaming yah penjelasannya...) :)) Nanti juga pasti akan terbayangkan lah ;) Perhatikan tulisan yg dekat kotak komentar Beben Convert your coded here, for friendly post!!! itu sob :) Bahan-bahan yg dibutuhkannya meliputi javascript, CSS dan juga HTML :P
Javascript 1
Cari tag <head> letakkan dibawahnya.<script type="text/javascript">
//<![CDATA[
function more() {
document.getElementById('Hidden').style.display = 'inline';
document.getElementById('Toggle').innerHTML = '<a href="javascript:goNes()">←</a></span>';
}
function goNes() {
document.getElementById('Hidden').style.display = 'none';
document.getElementById('Toggle').innerHTML = '<a href="javascript:more()">→</a>';
}
//]]>
</script>
Kalau mau disave dulu ya silahkan ;;) Centang template pojok kanan atas sobat. Tekan Ctrl + F pada keyboar lalu temukan kode <div class='comment-form'> Masukin javascript 2 berikut...//<![CDATA[
function more() {
document.getElementById('Hidden').style.display = 'inline';
document.getElementById('Toggle').innerHTML = '<a href="javascript:goNes()">←</a></span>';
}
function goNes() {
document.getElementById('Hidden').style.display = 'none';
document.getElementById('Toggle').innerHTML = '<a href="javascript:more()">→</a>';
}
//]]>
</script>
Javascript 2
<span style='font-weight:bold;color:#000000'>Convert your coded here, for friendly post</span>
<span id='Hidden' style='display: none;'>
<script type="text/javascript">
//<![CDATA[
function convert(){var ele1=document.getElementById("Beben-Koben");var replaced;replaced=ele1.value;replaced=replaced.replace(/</ig,"<");replaced=replaced.replace(/>/ig,">");replaced=replaced.replace(/"/ig,""");replaced=replaced.replace(/±/ig,"±");replaced=replaced.replace(/©/ig,"©");replaced=replaced.replace(/®/ig,"®");replaced=replaced.replace(/howdy/ig,"ya'll");ele1.value=replaced;}
//]]>
</script>
<table border="0" cellpadding="0" cellspacing="1" width="506"><tbody><tr><td valign="top" width="505"><textarea id="Beben-Koben" style="border: 1px groove rgb(231, 231, 231);" cols="37" rows="6"></textarea><br /><input value="Convert Code" onclick="convert();" type="button" style="background-color:#FF00FF" /></td></tr></tbody></table>
</span>
<span id='Toggle'><a href="javascript:more()">→</a></span>
Sobat sudah memiliki Convert Code for Post Friendly :) didekat komentar :) Happy blogging \m/
<span id='Hidden' style='display: none;'>
<script type="text/javascript">
//<![CDATA[
function convert(){var ele1=document.getElementById("Beben-Koben");var replaced;replaced=ele1.value;replaced=replaced.replace(/</ig,"<");replaced=replaced.replace(/>/ig,">");replaced=replaced.replace(/"/ig,""");replaced=replaced.replace(/±/ig,"±");replaced=replaced.replace(/©/ig,"©");replaced=replaced.replace(/®/ig,"®");replaced=replaced.replace(/howdy/ig,"ya'll");ele1.value=replaced;}
//]]>
</script>
<table border="0" cellpadding="0" cellspacing="1" width="506"><tbody><tr><td valign="top" width="505"><textarea id="Beben-Koben" style="border: 1px groove rgb(231, 231, 231);" cols="37" rows="6"></textarea><br /><input value="Convert Code" onclick="convert();" type="button" style="background-color:#FF00FF" /></td></tr></tbody></table>
</span>
<span id='Toggle'><a href="javascript:more()">→</a></span>
Loading... |
7 comments
DO NOT EVEN TRY ADD LINK [-X
You can use some HTML tags, such as
<b> - <i> - <a> - http://...jpg/gif/png/bmp - http://youtu.be/...