社区
JavaScript
帖子详情
js如何取得页面的
四十岁开始写程序
2005-11-27 10:07:09
如题
...全文
244
5
打赏
收藏
js如何取得页面的<LINK href="如何取得此处的内容" rel=stylesheet type=text/css>
如题
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
四十岁开始写程序
2005-12-08
打赏
举报
回复
不错
njtucomputer
2005-11-28
打赏
举报
回复
恩 document.getElementsByTagName("LINK") 就可以了
dh20156
2005-11-27
打赏
举报
回复
<LINK id="aa" href="http://community.csdn.net/Expert/topic/4420/4420821.xml?temp=.7602808">
<script language="javascript">
alert(aa.href);
</script>
dh20156
2005-11-27
打赏
举报
回复
TRY:
<a id="aa" href="http://community.csdn.net/Expert/topic/4420/4420821.xml?temp=.7602808">test</a>
<script language="javascript">
alert(aa.href);
</script>
donghid
2005-11-27
打赏
举报
回复
<head>
<link href="afsdfs.css" type="text/css">
</head>
<body>
<script>
var v=document.getElementsByTagName('LINK');
alert(v[0].href);
</script>
</body>
<
link
rel="
stylesheet
"
type
="
text
/
css
"
href
="
css
/index.
css
">详解
整条语句的含义是: 调用一个外部的
CSS
样式文件。他是通过<
link
/>这个标签来调用的。 然后,
href
="
css
/index.
css
" 表示外部样式文件的路径, rel="
stylesheet
"表示:调用的...
type
="
text
/
css
" 表示:就具体...
<
link
href
="
css
/index.
css
" rel="
Stylesheet
"
type
="
text
/
css
" />
然后,
href
="
css
/index.
css
" 表示外部样式文件的路径,rel="
stylesheet
"表示调用的是一种样式。 最后,
type
="
text
/
css
" 就具体说明调用样式的文件类型为
CSS
样式! 好处:调用外部样式能达到
内容
与样式分离的效果...
CSS
引入,引入外部
CSS
文件<
link
rel=“
stylesheet
“
href
=““ />或<style>@import</style> 测试2208092344
引入外部
css
文件的方式有
link
来的
css
的优先级@import来的
css
的优先级。
<
link
herf=“
css
/style.
css
“ rel=“
stylesheet
“
type
=“
text
/
css
“ media=“all“/>
html中
link
标记允许当前文档和外部文档之间建立连接,但是只能在head标签里面用。...
type
设置或获取对象的 MIME 类型,此处为
css
格式的文本 media设置或获取媒体类型。 all 就表示all所有媒体类型的样式 ...
<
link
rel="
stylesheet
"
type
="
text
/
css
"
href
="
css
/index.
css
">是啥意思?
整条语句的意思就是:调用一个外部的
CSS
样式文件。...然后,
href
="
css
/index.
css
" 表示外部样式文件的路径,rel="
stylesheet
"表示调用的是一种样式。 最后,
type
="
text
/
css
" 就具体说明调用样式的文件类型为
CSS
样式!
JavaScript
87,907
社区成员
224,614
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章