2017-07-07 16:17:46
- <script type="text/javascript">
 - function wesPrint(id_s)
 - {
 - var cc = document.getElementById(id_s).innerHTML;
 - var isIe=0;
 - if(navigator.userAgent.indexOf('MSIE')>0){
 - isIe = 1;
 - }
 - var frame = document.getElementById('dsh_myframe');
 - if (!frame) {
 - if (isIe) {
 - frame = document.createElement('<iframe id = "dsh_myframe"></iframe>');
 - } else {
 - frame = document.createElement('iframe');
 - frame.id ='dsh_myframe';
 - frame.setAttribute('style','width: 0pt; height: 0pt;')
 - }
 - }
 - if (isIe) {
 - frame.src = 'javascript:;';
 - frame.style.cssText= 'width: 0pt; height: 0pt;';
 - }
 - document.body.appendChild(frame);
 - if (isIe) {
 - doc = frame.contentWindow.document;
 - } else {
 - doc = frame.contentDocument;
 - }
 - doc.write(cc);
 - doc.close();
 - frame.contentWindow.focus();
 - if(isIe){
 - setTimeout(function(){
 - frame.contentWindow.print();
 - },2);
 - }else{
 - frame.contentWindow.print();
 - }
 - }
 - </script>
 - <div id="div1">Print area.....Test</div>
 - <button onlick="wesPrint('div1');">Print Div</button>
 
	更多精彩内容:各种AI课程、技能课程、黑科技软件、网站小程序源码、副业小项目、PPT模板等精品素材、电商课程、推广引流课程等,尽在 天边资源网 。