我正在寻找建议和代码示例来获取文件并将其加载到文本区域中。让我多给一点细节。从链接加载CSS/JS文件到文本框
我的代码搜索一个文件,并在该文件中有一个额外的CSS文件数组。我正在寻找一种方法来获得CSS文件加载到文本区域,一旦你点击一个按钮。
每个文件包含此:
$CSS = array(file.css);
现在,我怎么能得到:
<a href="file.css">CSS</a>
或
<button onclick="myFunction()">CSS</button>
要加载在这里:
<textarea id="filecontent" name="filecontent" cols="80" rows="10">".$filecontent."</textarea>
好吧 'http://www.site.com/ index.php' 'http:// www.site.com/assets/css/file.css' – Gromstone
另外请记住这将来自不同的文件,所以$ CSS = array(file.css)将是相同的。但并不是所有的链接都是一样的。 – Gromstone
其实这里是链接 'https:// secure.site.com/forms/administration/first-year/index.php'的更好样本 'https://secure.site.com/forms/hatternet/deland/index.php' – Gromstone