From 341941001aad5f60717d3349bab2dd3e730f55bf Mon Sep 17 00:00:00 2001 From: fabricio Date: Thu, 22 Sep 2016 13:45:39 -0300 Subject: [PATCH] classe javascript com funcionalidade para impressão de formulario --- WebContent/js/imprimir.js | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+), 0 deletions(-) create mode 100644 WebContent/js/imprimir.js diff --git a/WebContent/js/imprimir.js b/WebContent/js/imprimir.js new file mode 100644 index 0000000..2c59460 --- /dev/null +++ b/WebContent/js/imprimir.js @@ -0,0 +1,70 @@ +function printDiv(nome, cargo) { + //pega o Html da DIV + // var divElements = document.getElementById(divID).innerHTML; + //pega o HTML de toda tag Body + var oldPage = document.body.innerHTML; + var data=new Date(); + + //Alterna o body + document.body.innerHTML = + "" + + "Relatório Circunstanciado de Acessibilidade Digital" + + "" + + "" + + "
" + + "

RELATÓRIO CIRCUNSTANCIADO DE ACESSIBILIDADE DIGITAL (Art. 120 da Lei nº 13.146/2015)
" + + "MINISTÉRIO DO PLANEJAMENTO, DESENVOLVIMENTO E GESTÃO - MP
" + + "EXERCÍCIO DE 2016

" + + + "

" + + + "
" + + "" + "

" + + + "
" + + "Dados do Responsável pelo Preenchimento deste Formulário " + + "
" + + "
" + + "" + "
" + + "E-mail:" + "
" + + "

" + + + "
" + + "Dados Acessibilidade" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + "" + "
" + + + + "
" + + + + "
" + + + //+ divElements + + ""; + + //Imprime o body atual + window.print(); + + //Retorna o conteudo original da página. + document.body.innerHTML = oldPage; + + } \ No newline at end of file -- libgit2 0.21.2