JavaScript compatibility issue in chrome
<p>I am using the javascript code for print that is working fine in IE and Firefox but not working good in Chrome.
Any one have some idea.
My code is below:</p>

<pre><code>$(document).ready(function() {
    $("#hrf1").click(function() {      
        var win = window.open();
        self.focus();
        win.document.open();
        win.document.write("&lt;table id='tbl' width='216' height='180' align='left' style='border: dotted 4px black;'&gt;");
        win.document.write(document.getElementById("tbl").innerHTML);
        win.document.write('&lt;/table&gt;');
        win.document.close();
        win.print();
        win.close();
    });
}); 
</code></pre>
