作者localhost (127.0.0.1)
看板PHP
標題Re: [請益] include html和所在資料夾下的css js
時間Mon May 18 10:16:13 2015
引用js檔
<script type="text/javascript" src="contact/js/index.js"></script>
引用css檔
<link rel="stylesheet" type="text/css" href="contact/css/style.css">
若是要include html檔 include "contact/index.html"
不過不知道這有什麼意義...
看到文章內容 我哭了 不過這問題跟php沒什麼關係就是了
※ 引述《Rivety (no)》之銘言:
: 需要在其它網頁呼叫contact資料夾下的index.html內容
: 包含contact/css js等等..
: <?php
: include "contact/index.html";
: include "contact/css/style.css";
: include "contact/js/index.js";
: include "contact/scss/style.scss";
: ?>
: 很顯然沒有用,該如何做呢?
: 新手上路,請多包涵...
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 210.62.185.25
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1431915375.A.472.html
※ 編輯: localhost (210.62.185.25), 05/18/2015 10:17:59
推 Rivety: 有試過<script>跟<link>,但是外部css會跟原本網頁的衝突 05/18 12:59
→ Rivety: 比如說有兩個body的style..我不想去新增原始檔案的css資料 05/18 13:00
→ Rivety: 的話, 有其他方法可以做到嗎? 謝謝大家的耐心.... 05/18 13:00
→ MOONRAKER: 有兩個body就刪掉一個啊 code不都控制在你嗎 05/18 17:12