我已经下载了
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"