UBB编辑器(3)
}
function chfont(font) {
if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "" + range.text + "";
}
else
{
txt=window.prompt("请输入内容","");
if (txt!=null)
{
AddTxt=""+txt;
AddText(AddTxt);
AddText("");
}
}
}
function chcolor(color) {
if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "" + range.text + "";
}
else
{
txt=window.prompt("请输入内容","");
if(txt!=null) {
AddTxt=""+txt;
AddText(AddTxt);
AddText("");
}
}
}
//-->
</script>
</head>
<body>
<form method=post name="ubbform" action="">
<table align="center" border="0">
<tr>
<td>
<select name="font" onFocus="this.selectedIndex=0" onChange="chfont(this.options[this.selectedIndex].value)" size="1">
<option value="" selected>选择字体</option>
<option value="宋体">宋体</option>
<option value="黑体">黑体</option>
内容版权声明:除非注明,否则皆为本站原创文章。