www.gusucode.com > YulinCMS 雨林内容管理系统 2.0源码程序 > Admin/JS/CustomCall.js
function previewTemplate() { var width = screen.availWidth-20; var height= screen.availHeight-20; var body = document.getElementById(getClientId('txtTemplate')).value; var preWindow = window.open('','PreviewTemplateWindow','left=0,top=0,width='+width+',height='+height+',resizable=1,scrollbars=1, status=1, Toolbar=1, menubar=0'); //var header = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; //header += '<style>body,a,table,div,span,td,th,input,select{font-size:9pt;font-family: Arial,Verdana,Sans-Serif;} body {margin:5px;} </style></head><body>'; //var footer = "</body></html>"; preWindow.document.open(); //preWindow.document.write(header+body+footer); preWindow.document.write(body); preWindow.document.close(); preWindow.document.title = " 预览模板内容 "; }