网页制作常用代码
showModalDialog(sURL [, vArguments] [, sFeatures])
//打开一个模式对话框
//vArguments=需要向新开模式对话框传递的参数
//sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth;center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised };help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*)
showModelessDialog(sURL [, vArguments] [, sFeatures])
//打开一个非模式对话框
//vArgument=需要向新开模式对话框传递的参数
//sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth;center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised };help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*)
********************************************
execCommand的完全参考(中文版)
document.execCommand(sCommand[,交互方式, 动态参数])
2D-Position;document.execCommand("2D-Position","false","true");使绝对定位的对象可直接拖动;ie5.5
AbsolutePosition;document.execCommand("AbsolutePosition","false","true");使对象定位变成绝对定位;ie5.5
BackColor;document.execCommand("BackColor","false",sColor);设置背景颜色;ie4.0
BlockDirLTR;none;使块级元素排版方式为从左到右?;不支持
BlockDirRTL;none;使块级元素排版方式为从右到左?;不支持 Bold;document.execCommand("Bold","false",null);使选中区域的文字加粗;ie4.0
BrowseMode;none;设置浏览器模式?;不支持 Copy;
document.execCommand("Copy","false",null);复制选中的文字到剪贴板;ie4.0 CreateBookmark;document.execCommand("CreateBookmark","false",sAnchorName);设置指定锚点为书签;ie4.0
CreateLink;document.execCommand("CreateLink","false",sLinkURL);将选中文本变成超连接,若第二个参数为true,会出现参数设置对话框;ie4.0
Cut;document.execCommand("Cut","false",null);剪贴选中的文字到剪贴板;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
********************************************
如何把页面加入用户的收藏夹?
收藏网页教学网脚本
********************************************
如何让浏览器在保存页面时保存失败?
********************************************
一个页面内所有复选框的全选功能如何实现?
********************************************
如何在不刷新页面的情况下刷新css?
Flex布局让子项保持自身高度如何实现 Flex布局让子项保持自身高度实现方法
获取localStorage最大存储大小的方法代码
video如何实现有声音自动播放 video实现有声音自动播放方法
table中cesllspacing与cellpadding有什么区别 table中cesllspacing与cellpadding区别解析
border-radius如何给元素添加圆角边框 border-radius给元素添加圆角边框方法
解决移动端1px边框问题的几种方法