我已经下载了
example
来自TableTools.哪个工作正常.我做的是我将index.html的内容复制到另一个文件并关联每个路径. Flash加载正常但除了打印按钮之外,每个控件都被禁用.可能是什么问题.
<title>TableTools example</title> <style type="text/css" title="currentStyle"> @import "http://localhost/media/css/demo_page.css"; @import "http://localhost/media/css/demo_table.css"; @import "http://localhost/TableTools/media/css/TableTools.css"; </style> <script type="text/javascript" charset="utf-8" src="http://localhost/media/js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="http://localhost/media/js/jquery.dataTables.js"></script> <script type="text/javascript" charset="utf-8" src="http://localhost/TableTools/media/ZeroClipboard/ZeroClipboard.js"></script> <script type="text/javascript" charset="utf-8" src="http://localhost/TableTools/media/js/TableTools.js"></script> <script type="text/javascript" charset="utf-8"> $(document).ready( function () { $('#example').dataTable( { "sDom": 'T<"clear">lfrtip',"oTableTools": { "sSwfPath": "http://localhost/TableTools/media/swf/ZeroClipboard.swf" } } ); } ); </script>
解决方法
基本上问题是关于错误地指定swf路径.
"sSwfPath": "http://localhost/TableTools/media/swf/ZeroClipboard.swf"
尝试用这个路径替换
"sSwfPath": "../media/swf/ZeroClipboard.swf"