<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script><link href="http://code.jquery.com/ui/jquery-ui-git.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-git.js"></script>
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script><div id="ReportPopup">
<div id="PrintDivcontent">
<div id="ReportTablecontainer">
<table id="ReportTable"><tbody><tr><th>Time</th><th>Action</th><th>comment</th></tr><tr class=""><td style="text-align:center;width:25%">2014-06-05 13:50:03</td><td style="padding-left:5px;width:50%">cdfsdfsd</td><td style="text-align:center;width:25%"></td></tr><tr class="altRow"><td style="text-align:center;width:25%">2014-06-05 13:51:58</td><td style="padding-left:5px;width:50%">fsdfsd</td><td style="text-align:center;width:25%">dsfsd</td></tr><tr class=""><td style="text-align:center;width:25%">2014-06-05 13:52:01</td><td style="padding-left:5px;width:50%">dfsdfs</td><td style="text-align:center;width:25%">sfsdfs</td></tr><tr class="altRow"><td style="text-align:center;width:25%">2014-06-05 14:25:45</td><td style="padding-left:5px;width:50%">dsfsdfs</td><td style="text-align:center;width:25%">sdfsdfsd</td></tr><tr class=""><td style="text-align:center;width:25%">2014-06-05 14:42:10</td><td style="padding-left:5px;width:50%">sdfsdfsd</td><td style="text-align:center;width:25%">sdfsdfsd</td></tr></tbody></table>
</div>
</div>
<div class="reportButtonContainer">
<input type="button" onclick="printDiv()" value="PRINT">
</div>
</div>
$(document).ready(function(){
$("#ReportPopup").dialog({
modal:true,
resizable: false,
title: 'Report',
show: {
effect : 'fold'
},
hide:{
effect : 'fold'
},
width: 650,
height: 600 ,
minHeight:"auto"
});
});
function printDiv() {
/* var originalContents = document.body.innerHTML;
var printContents = document.getElementById('PrintDivcontent').innerHTML;
document.body.innerHTML = "<html><head><title></title></head><body style='background-color:#FFFFFF;'>"+ printContents + "</body>";
window.print(); */
var divContents = $("#PrintDivcontent").html();
var printWindow = window.open('', '', 'height=600,width=800');
printWindow.document
.write('<html><head><title>Title of Print Page</title>');
printWindow.document.write('</head><body >');
printWindow.document.write(divContents);
printWindow.document.close();
printWindow.print();
printWindow.close();
}
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |