Buscar contenidos

viernes, 28 de septiembre de 2018

Allowing javascript to run on a windows form web browser

https://stackoverflow.com/questions/25142594/allowing-javascript-to-run-on-a-windows-form-web-browser

HTML fix;
<!DOCTYPE html> 
<html> 
  <head> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
    ... other headers
  </head>
  <body>
    ... content
  </body>
</html>  

jQuery Plugin To Print Any Part Of Your Page - Print

https://www.jqueryscript.net/other/jQuery-Plugin-To-Print-Any-Part-Of-Your-Page-Print.html

https://jasonday.github.io/printThis/#nada

How to use it:

1. Specify an unique ID to your html element where you want to make it printable.
1<div id="printable">
2Your Content
3</div>
2. Create a button to print the specified html element.
1<button class="print"> Print this </button>
3. Import the latest jQuery library and jQuery print plugin.
2<script src="../jQuery.print.js"></script>
4. Call the plugin on the print button.
1<script type='text/javascript'>
2$(function() {
3$("#printable").find('.print').on('click', function() {
4$.print("#printable");
5});
6});
7</script>