//fis-conf.js
fis.match("*.html",{
preprocessor:function(content,file){
return content+='<pre>'+content+'</pre>';
}
})
/*目的是想匹配html文件里面的
“<script type="text/javascript" src="index.js" data-use="init"></script>”
这段代码,做sea.use()调用的处理,
上面的代码只是试一试 content 的内容是什么,
结果conten里面并没有
<script type="text/javascript" src="index.js" data-use="init"></script> */
html文件代码是这样的
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title></title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<meta name="renderer" content="webkit">
<link type="text/css" rel="stylesheet" href="index.scss">
<script src="../../js/lib/sea.js"></script>
</head>
<body>
<p class="base_body">
<p class="base_page" id="base_index" data-pjax_wrap>
<p class="view_pjax">
<p class="view_replace">111111</p>
<a data-pjax class="" href="../pjax_test/pjax_test.html">百度</a>
</p>
</p>
</p>
<script type="text/javascript" src="index.js" data-use="init"></script>
</body>
</html>
<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title></title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<meta name="renderer" content="webkit">
undefined
<body>
<p class="base_body">
<p class="base_page" id="base_index" data-pjax_wrap>
<p class="view_pjax">
<p class="view_replace">111111</p>
<a data-pjax class="" href="../pjax_test/pjax_test.html">百度</a>
</p>
</p>
</p>
undefined
</html></pre>
不知道什么原因 link 跟 script 那两个地方 是 undefined????求解?求介绍一个地方可以请教fis3的相关问题?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证0级讲师