From a3b730ff4abc0e3553bdd75401d7cadc23b3544e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 16 Jun 2017 09:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E8=BF=9F=E5=8A=A0=E8=BD=BDjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/htmlcompressor/controllers/index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/application/third_party/htmlcompressor/controllers/index.php b/application/third_party/htmlcompressor/controllers/index.php index f68849d8..b2bbc8bf 100644 --- a/application/third_party/htmlcompressor/controllers/index.php +++ b/application/third_party/htmlcompressor/controllers/index.php @@ -60,8 +60,7 @@ class Index extends CI_Controller { $link_script->outertext = ''; //删除链接,移动到页底 } else { //网页内的js不需要提取 - //$js_content.= $link_script->innertext;//js的内容 - $js_content.= $link_script; + $js_content.= $link_script->innertext;//js的内容 $link_script->outertext = ''; //删除js,移动到页底 } } @@ -90,7 +89,7 @@ class Index extends CI_Controller { //在最后加载原始css文件和js文件 //把css移动到页面底部,延迟加载 - $lastload_js = ''; } - $lastload_js.=$js_content; + $lastload_js.=''; $html_object = str_replace('', $lastload_js . '', $html_object); }