怎么设置框架网页的背景颜色

怎么设置框架网页的背景颜色,第1张

<IFRAME ID="frame1" SRC="ahtml" allowTransparency="true" HEIGHT=180 WIDTH=300> </IFRAME> <IFRAME ID="frame2" SRC="bhtml" allowTransparency="true" STYLE="background-color:#459800" HEIGHT=180 WIDTH=300> </IFRAME> 框架:STYLE="background-color:transparent"

<div style="background-image:url(1gif)"/>
<script>
function attr(el, name, val) {
function trans(el, c) {
c = elcharAt(0);
c = cmatch(/^[#\\$]/) c : "";
return typeof el === "object" &&
ObjectprototypetoStringcall(el)match(/\[object HTMLElement\]/) el
: typeof el === "string" &&
(el = (document[
["getElementById", "getElementsByClassName", "getElementsByName", "getElementsByTagName"]
[{"#": 0, "": 1, "$": 2, "": 3}[c]]])(elsubstring(c 1 : 0)), c (el=[el]) : ellength) el : null;
}
el = trans(el);
if (el && typeof name === "string") {
if (argumentslength >= 3) {
if (ellength) {
var l = ellength;
while (l--) {
attr(el[l], name, val);
}
return;
}
if (elsetAttribute) {
elsetAttribute(name, val);
} else {
el[name] = val;
}
} else {
el = ellength && el[0] || el;
if (elgetAttribute) {
return elgetAttribute(name);
}
return el[name];
}
}
}
style("div","background-color","red");
</script>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/13396147.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-28
下一篇 2023-07-28

发表评论

登录后才能评论

评论列表(0条)

保存