当前位置:.net爱好者技术文章HTML&CSS → HTML Tip -- 51Windows

HTML Tip -- 51Windows

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2008-2-28 上午 12:08:21 阅读:[]
);剪贴选中的文字到剪贴板;ie4.0
Delete;document.execCommand("Delete","false",null);删除选中的文字;ie4.0
DirLTR;none;排版方式为从左到右?;不支持 DirRTL;none;排版方式为从右到左?;不支持
EditMode;none;设置编辑模式?;不支持
FontName;document.execCommand("FontName","false",sFontName);改变选中区域的字体;ie4.0
FontSize;document.execCommand("FontSize","false",sSize|iSize);改变选中区域的字体大小;ie4.0
ForeColor;document.execCommand("ForeColor","false",sColor);设置前景颜色;ie4.0
FormatBlock;document.execCommand("FormatBlock","false",sTagName);设置当前块的标签名;ie4.0
********************************************
如何把页面加入用户的收藏夹?
<a href="javascript:window.external.AddFavorite('http://www.51js.com','无忧脚本')">收藏无忧脚本</a>
********************************************
如何让浏览器在保存页面时保存失败?
<NOSCRIPT>
<IFRAME SRC="*.html">
</IFRAME>
</NOSCRIPT>
********************************************
一个页面内所有复选框的全选功能如何实现?
<input type=checkbox><input type=checkbox>
<input type=checkbox><input type=checkbox>
<button onclick=SelectAll()>SelectAll</button>
<script>
function SelectAll()
{
var cInput=document.all.tags('INPUT');
for(var i in cInput)
if(cInput[i].type=='checkbox')cInput[i].checked=true;
}
</script>
********************************************
如何在不刷新页面的情况下刷新css?
<style>
button{ color:#000000;}
</style>
<button onclick=document.styleSheets[0].rules[0].style.color='red'>点击按钮直接修改style标签里button选择符使按钮改为红色</button>

上一页  [1] [2] [3] [4] [5] [6] [7] [8]