DEMO BLOCKQUOTE WITH LINE NUMBERING



<script type="text/javascript">
//<![CDATA[
var pre = document.getElementsByTagName('blockquote'),
    pl = pre.length;
for (var i = 0; i < pl; i++) {
    pre[i].innerHTML = '<span class="line-number"></span>' + pre[i].innerHTML + '<span class="cl"></span>';
    var num = pre[i].innerHTML.split(/\n/).length;
    for (var j = 0; j < num; j++) {
        var line_num = pre[i].getElementsByTagName('span')[0];
        line_num.innerHTML += '<span>' + (j+1) + '</span>';
    }
}
//]]>
</script>

2 comments

Erna Ayuning Nareswari delete 7 September 2017 pukul 18.21

yuhuu

Anonim delete 17 September 2017 pukul 07.40

a