<%@ Page Title="" Language="C#" MasterPageFile="~/ancestors.Master" AutoEventWireup="true" CodeBehind="notice.aspx.cs" Inherits="loginpage.gly.notice" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<div runat="server" >
<script language="javascript">
//设置编辑区域
function document.onreadystatechange() {
txtArea.document.designMode = "On";
}
//设置文字颜色
function txtColor() {
txtArea.document.execCommand("FontColor")
}
//设置文字居左
function txtLeft() {
txtArea.document.execCommand("justifyLeft");
}
//设置文字居中
function txtCenter() {
txtArea.document.execCommand("justifyCenter");
}
//设置文字居右
function txtRight() {
txtArea.document.execCommand("justifyRight");
}
//设置文字为粗体
function txtbold() {
txtArea.document.execCommand("Bold");
}
//设置文字为斜体
function txtItalic() {
txtArea.document.execCommand("Italic");
}
//设置文字字号
function txtFontName() {
var txtSize = document.getElementById("Select1").value;
txtArea.document.execCommand("fontsize", "", txtSize)
}
//设置文字下划线
function txtUnderline() {
txtArea.document.execCommand("Underline");
}
//将文本保存到隐藏域中
function saveTxt() {
var s = txtArea.document.body.innerHTML;
document.getElementById("hiddenText").value = s
}
</script>
</div> <div runat="server">
<div>
<div style="text-align: center">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
<tr>
<td style="height: 7px;" colspan="2">
<table border="0" cellpadding="0" cellspacing="0"
style="width: 84%; height: 100%; text-align: center;"> <tr>
<td style="width: 100%; height: 24px; ">
颜色<select onchange="txtColor();" id="Select2">
<option selected="selected" value="black">黑色</option>
<option value="red">红色</option>
<option value="blue">蓝色</option>
</select>
字号<select onchange="txtFontName();" id="Select1">
<option selected="selected" value="3">3</option>
<option value="5">5</option>
<option value="8">8</option>
</select>
<input id="btnBold" type="button" value="粗体" onclick="txtbold();" />
<input id="btnItalic" type="button" value="斜体" onclick="txtItalic();" />
<input id="btnUnder" type="button" value="下划线" onclick="txtUnderline();" />
<input id="btnLeft" type="button" value="左对齐" onclick="txtLeft();" />
<input id="btnCenter" type="button" value="居中" onclick="txtCenter();" />
<input id="btnRight" type="button" value="右对齐" onclick="txtRight();" />
</td>
</tr>
</table>
</tr>
<tr>
<td colspan="2" valign="top" style="height: 341px">
<iframe id="txtArea" name="txtArea" marginwidth="1" marginheight="1" allowtransparency="false" border="0" frameborder="0" style="height: 337px; border-right: #000033 1px solid; border-top: #000033 1px solid; border-left: #000033 1px solid; border-bottom: #000033 1px solid; " width="98%">
</iframe>
</td>
</tr>
</table>
</div>
</div>
<input id="hiddenText" name="hiddenText" type="hidden" runat="server" width="100%"/>
<asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click1" /><br />
</div>
</asp:Content>为什么其他的成功 就字体颜色不行呢???
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<div runat="server" >
<script language="javascript">
//设置编辑区域
function document.onreadystatechange() {
txtArea.document.designMode = "On";
}
//设置文字颜色
function txtColor() {
txtArea.document.execCommand("FontColor")
}
//设置文字居左
function txtLeft() {
txtArea.document.execCommand("justifyLeft");
}
//设置文字居中
function txtCenter() {
txtArea.document.execCommand("justifyCenter");
}
//设置文字居右
function txtRight() {
txtArea.document.execCommand("justifyRight");
}
//设置文字为粗体
function txtbold() {
txtArea.document.execCommand("Bold");
}
//设置文字为斜体
function txtItalic() {
txtArea.document.execCommand("Italic");
}
//设置文字字号
function txtFontName() {
var txtSize = document.getElementById("Select1").value;
txtArea.document.execCommand("fontsize", "", txtSize)
}
//设置文字下划线
function txtUnderline() {
txtArea.document.execCommand("Underline");
}
//将文本保存到隐藏域中
function saveTxt() {
var s = txtArea.document.body.innerHTML;
document.getElementById("hiddenText").value = s
}
</script>
</div> <div runat="server">
<div>
<div style="text-align: center">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
<tr>
<td style="height: 7px;" colspan="2">
<table border="0" cellpadding="0" cellspacing="0"
style="width: 84%; height: 100%; text-align: center;"> <tr>
<td style="width: 100%; height: 24px; ">
颜色<select onchange="txtColor();" id="Select2">
<option selected="selected" value="black">黑色</option>
<option value="red">红色</option>
<option value="blue">蓝色</option>
</select>
字号<select onchange="txtFontName();" id="Select1">
<option selected="selected" value="3">3</option>
<option value="5">5</option>
<option value="8">8</option>
</select>
<input id="btnBold" type="button" value="粗体" onclick="txtbold();" />
<input id="btnItalic" type="button" value="斜体" onclick="txtItalic();" />
<input id="btnUnder" type="button" value="下划线" onclick="txtUnderline();" />
<input id="btnLeft" type="button" value="左对齐" onclick="txtLeft();" />
<input id="btnCenter" type="button" value="居中" onclick="txtCenter();" />
<input id="btnRight" type="button" value="右对齐" onclick="txtRight();" />
</td>
</tr>
</table>
</tr>
<tr>
<td colspan="2" valign="top" style="height: 341px">
<iframe id="txtArea" name="txtArea" marginwidth="1" marginheight="1" allowtransparency="false" border="0" frameborder="0" style="height: 337px; border-right: #000033 1px solid; border-top: #000033 1px solid; border-left: #000033 1px solid; border-bottom: #000033 1px solid; " width="98%">
</iframe>
</td>
</tr>
</table>
</div>
</div>
<input id="hiddenText" name="hiddenText" type="hidden" runat="server" width="100%"/>
<asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click1" /><br />
</div>
</asp:Content>为什么其他的成功 就字体颜色不行呢???
解决方案 »
- gridview上传文件重复怎么办??
- asp.net+mc3000 条码识别
- 自己开发的控件,支持精确报表套打和智能脚本计算,欢迎拍砖
- 跪求双轨制直销系统整站!有源码最好!顶者有分!
- 重分100,请您给讲讲,socket是什么技术,在asp.net开发过程中有什么作用(或者说它都能开发什么程序。)
- 近期我们的oracle数据库很慢,我的网页从里面统计数据时很慢,我想如果在规定的时间内统计不出数据来就跳过去
- 50条记录 如何高效插入DB中?
- Server Error in '/xnfx' Application.
- 感谢大家的祝福 继续散分 1分钟结束
- asp.net里使用oledb连接同一个数据库,两个SQL语句如何先后执行?
- 求教关于Ext的问题
- 跪求各位大神看看这里的代码有什么错误..数据库读入时不能显示第三条数据
不是写在value里么.....
小弟菜鸟 求赐教