function oCP(){if(!document.getElementById('dlgHelper'))document.body.insertAdjacentHTML("BeforeEnd",oBject)var oColor = dlgHelper.ChooseColorDlg(oInitColor).toString(16) file://弹出调色板oColor=((oColor.length < 6)?"000000".substring(0,6-oColor.length):"")+oColor file://按六位十六进制补齐返回颜色代码demo.style.color="#"+oColor file://设置字体颜色oInitColor=oColor file://对oInitColor重赋值,使打开调色板时的默认颜色为上次选中的颜色}</script>font-size:<select style="width:40" onchange="demo.style.fontSize=this.options[this.selectedIndex].value+'pt'"><script>for(i=1;i<61;i++)document.write("<option value="+i+">"+i)</script></select> font-family:<span id=list>'Courier New'</span><br><input type=button onclick=oFonts() value="Show SysFonts"> <input type=button onclick=oCP() value="Show ColorPanel"><br><textarea style="width:100%;height:300" id=demo style="overflow:hidden;border:1px solid #999999">测试演示TestDemo</textarea> 脚本效果需要IE5.5+的支持
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18