为什么filter="alpha(opacity=50)无效 你可以修改Google 和百度代吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不是啊,在Maxthon中的面板中执行这个代码啊 那就不知道了....也Maxthon 不支持 这功能吧! document.body.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=50)" <html><head><script type="text/javascript">function change(aaa) { document.body.style.filter="alpha(opacity="+aaa+")";}</script></head><body><input type="text" name="AAV" value=""><input type="button" value="change" onclick="change(AAV.value)">111111</body></html>這樣寫是可以的。<html><head><script type="text/javascript">document.body.style.filter="alpha(opacity=50)";</script></head><body><input type="text" name="AAV" value=""><input type="button" value="change">111111</body></html>直接這樣寫實沒有效果的,因爲執行到script的時候body裏面還有東西,也是說還沒有body這個對象。 在百度和Google上有效?截个图来看看? 我已经打开了百度和Google了的搜索页面了,比如http://www.baidu.com/s?ct=&lm=&z=&rn=&word=%E9%80%8F%E6%98%8E%E6%BB%A4%E9%95%9C%E6%97%A0%E6%95%88&ie=utf-8然后再在Maxthon的收集面板中执行,所以不是你所说没有完全加载document.body.style.filter="alpha(opacity=50)"; 也许收集面板里面的脚本需要套在script标签里边:<script language=javascript>document.body.style.filter="alpha(opacity=50)";</script> 哦。因为这代码是IE ONLY的.. var setOpacity = function(element, level) { element.filters ? element.style.filter = 'alpha(opacity=' + level + ')' : element.style.opacity = level / 100; } setOpacity(document.body, 50); 你是不是指不兼容啊??IE和FF写法不同的啊一个是50,一个0.5不一样的 说明是在Maxthon下。IE7。不关FireFox的事啊。大家打开这个百度这个网页http://www.baidu.com/s?ct=&lm=&z=&rn=&word=%E9%80%8F%E6%98%8E%E6%BB%A4%E9%95%9C%E6%97%A0%E6%95%88&ie=utf-8然后在Maxthon的收集面板中执行这个Javascript代码,希望将页面设为半透明。但是不成功。document.body.style.filter="alpha(opacity=50)";而在我的页面中,执行这个代码是可以将页面设为半透明的。http://www.chenjiliang.com/Admin/OnlineList.aspx楼上有一同志说都可以设为透明,而我的测试在百度页面不可以。不知道道有什么其他的方法可以将页面设为半透明? http://p.blog.csdn.net/images/p_blog_csdn_net/rjzou2006/EntryImages/20081030/filter.JPG http://p.blog.csdn.net/images/p_blog_csdn_net/rjzou2006/EntryImages/20081030/filter.JPG 在IE下使用css属性filter:alpha(opacity=50)能使Div半透明,但是在默认启用增强安全设置的 IE 7下面却无法实现半透明。往往在本地制作html时没问题,上传到远端服务器上就出问题。经测试,原因出在……http://www.77fashion.cn/post/ie_unAlpha.aspx 在线等,急急急急,iframe在线编辑器,获得光标前面一个字 如何让div适应图片大小? 判断用户注册信息 如何修改样式 这中样式该如何布局 Js顺序输出标签元素? 求助csdn首页的那个新闻,blog,论坛,图书的tab签的做法 工作流中 设计 计算控件 的一个问题 能不能在网页的不同地方设置不同的popup menu? 如何才可以在网页中运行一个EXE文件,JAVA脚本能实现吗? 如何屏蔽prompt() encodeURIComponent中文乱码如何解决? 大难题来了! 有什么办法通过JavaScript实现实时的语法高亮显示?
<html>
<head>
<script type="text/javascript">
function change(aaa) {
document.body.style.filter="alpha(opacity="+aaa+")";
}
</script>
</head>
<body>
<input type="text" name="AAV" value="">
<input type="button" value="change" onclick="change(AAV.value)">111111
</body>
</html>這樣寫是可以的。
<html>
<head>
<script type="text/javascript">
document.body.style.filter="alpha(opacity=50)";
</script>
</head>
<body>
<input type="text" name="AAV" value="">
<input type="button" value="change">111111
</body>
</html>直接這樣寫實沒有效果的,因爲執行到script的時候body裏面還有東西,也是說還沒有body這個對象。
我已经打开了百度和Google了的搜索页面了,比如
http://www.baidu.com/s?ct=&lm=&z=&rn=&word=%E9%80%8F%E6%98%8E%E6%BB%A4%E9%95%9C%E6%97%A0%E6%95%88&ie=utf-8然后再在Maxthon的收集面板中执行,所以不是你所说没有完全加载
document.body.style.filter="alpha(opacity=50)";
<script language=javascript>
document.body.style.filter="alpha(opacity=50)";
</script>
var setOpacity = function(element, level) {
element.filters ? element.style.filter = 'alpha(opacity=' + level + ')' : element.style.opacity = level / 100;
} setOpacity(document.body, 50);
一个是50,一个0.5
不一样的
http://www.baidu.com/s?ct=&lm=&z=&rn=&word=%E9%80%8F%E6%98%8E%E6%BB%A4%E9%95%9C%E6%97%A0%E6%95%88&ie=utf-8然后在Maxthon的收集面板中执行这个Javascript代码,希望将页面设为半透明。但是不成功。
document.body.style.filter="alpha(opacity=50)";
而在我的页面中,执行这个代码是可以将页面设为半透明的。
http://www.chenjiliang.com/Admin/OnlineList.aspx
楼上有一同志说都可以设为透明,而我的测试在百度页面不可以。
不知道道有什么其他的方法可以将页面设为半透明?
filter:alpha(opacity=50)
能使Div半透明,但是在默认启用增强安全设置的 IE 7下面却无法实现半透明。
往往在本地制作html时没问题,上传到远端服务器上就出问题。
经测试,原因出在……
http://www.77fashion.cn/post/ie_unAlpha.aspx