我这段脚本语言在另外的一个jsp文件打印就行 但是在用了EXT的jsp页面 IE运行老是提示脚本语言有错
<script language=javascript>function printpr() //预览函数
{
var OLECMDID = 7;
var PROMPT = 1;
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);//在body标签内加入html(WebBrowser activeX控件)
WebBrowser1.ExecWB(OLECMDID, PROMPT);WebBrowser1.outerHTML = "";}
</script>
<script type="text/javascript" src="ext3.0/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ext3.0/ext-all.js"></script><script type="text/javascript" src="ext3.0/ext-lang-zh_CN.js"></script><script type="text/javascript" src="ext3.0/ux/treegrid/treegrid/TreeGridSorter.js"></script> <script type="text/javascript" src="ext3.0/ux/treegrid/treegrid/TreeGridColumnResizer.js"></script> <script type="text/javascript" src="ext3.0/ux/treegrid/treegrid/TreeGridNodeUI.js"></script> <script type="text/javascript" src="ext3.0/ux/treegrid/treegrid/TreeGridLoader.js"></script> <script type="text/javascript" src="ext3.0/ux/treegrid/treegrid/TreeGridColumns.js"></script> <script type="text/javascript" src="ext3.0/ux/treegrid/treegrid/TreeGrid.js"></script>
<script type="text/javascript" src="report/projectReport4superior.js"></script>
IE,和360浏览器是禁止的,除非你把你的浏览器的安全改为最低。