22 lines
813 B
JavaScript
22 lines
813 B
JavaScript
|
$(function() {
|
||
|
$('#list').DataTable({/*сортируем по фамилии*/
|
||
|
"aaSorting": [[ 2, "asc" ]]
|
||
|
});
|
||
|
|
||
|
$('#list tbody tr').each(function(i) {
|
||
|
var number = i + 1;
|
||
|
$(this).find('td:first').text(number);/* нумеруем */
|
||
|
});
|
||
|
|
||
|
function printit(){
|
||
|
if (window.print) {
|
||
|
window.print() ;
|
||
|
} else {
|
||
|
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
|
||
|
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
|
||
|
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = "";
|
||
|
}
|
||
|
history.back();
|
||
|
}
|
||
|
printit();
|
||
|
});//var prc=Math.round(19/51*100);
|