css 文本域textarea显示成label标签
<html>
<head>
<title>textarea显示为label</title>
<style type="text/css">
.textdisplay {
background-color:#eeeeee;
border-bottom-style:none;
border-left-style:none;
border-right-style:none;
border-top-style:none;
font-size:14px;
}
</style>
<script language="javascript">
function setTxt(obj){
if(obj=='e'){
document.getElementById('sendcontent').className='';
document.getElementById('sendcontent').readOnly=false;
document.getElementById('save').disabled=false;
document.getElementById('cancel').disabled=false;
}
if(obj=='c'){
document.getElementById('sendcontent').className='textdisplay';
document.getElementById('sendcontent').readOnly=true;
document.getElementById('save').disabled=true;
document.getElementById('cancel').disabled=true;
}
}
</script>
</head>
<body>
<textarea class="textdisplay" cols="" rows="" id="sendcontent" name="sendcontent" style="height:500px;width:600px;" readonly>
<input type="submit" disabled=true id="save" name="save" value="保存" style="height:24px;vertical-align:middle;line-height:20px;" />
<input type="button" name="edit" value="编辑" style="height:24px; vertical-align:middle;line-height:20px;" onclick="setTxt('e')" />
<input type="button" disabled=true id="cancel" name="cancel" value="取消" style="height:24px; vertical-align:middle;line-height:20px;" onclick="setTxt('c')" />
</body>
</html>
css 文本域textarea显示成label标签的更多相关文章
- 文本域textarea显示输入剩余字数
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 文本域textarea
文本域 CreateTime--2017年5月23日15:12:08Author:Marydon 二.文本域 (一)语法 <textarea></textarea> (二) ...
- palacehoder的自定义样式【输入框input /文本域textarea】
7.palacehoder的自定义样式[输入框input /文本域textarea] 因为每个浏览器的CSS选择器都有所差异,所以需要针对每个浏览器做单独的设定(可以在冒号前面写input和texta ...
- 解决:HTML中多文本域(textarea)回车后数据存入数据库,EL表达式取出异常。
问题描述: 当多文本域(textarea)回车后数据存入数据库. EL表达式取出异常,值换行倒置页面报错. 问题解决: 存值脚本代码,提交前转换\n为<br/>. <script t ...
- CSS 文本溢出时显示省略标记
如标题所示... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.o ...
- 占满屏幕的宽高,当把textarea换成其他标签的时候,怎么才能编辑?
$('.nav').width($(window).width()); $('.nav').height($(window).height()); 当把textarea换成其他标签的时候,怎么才能 ...
- Bootstrap 表单控件一(单行输入框input,下拉选择框select ,文本域textarea)
单行输入框,常见的文本输入框,也就是input的type属性值为text.在Bootstrap中使用input时也必须添加type类型,如果没有指定type类型,将无法得到正确的样式,因为Bootst ...
- css文本超出隐藏显示省略号
p style="width: 300px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> 如 ...
- html文本域textarea高度自增、自动换行
文本域自动换行.高度自增,采用以下方式: html: <textarea rows="1" class="answerTextArea" maxlengt ...
随机推荐
- poj 1182 并查集高级应用
C - 是谁站在食物链的顶端 Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:10000KB ...
- shell中对于命令的搜寻顺序
当你在shell命令行输入一条命令时,shell的搜寻顺序是如何的呢?当你的脚本名字和shell中的函数名字重名,shell是如何决定运行哪一个的? 在shell中,shell对于命令的搜寻优先级为: ...
- MySQL锁等待分析【1】
场景: 昨天业务系统上遇到了数据库慢的问题(对dcsdba.og_file_audit表的insert 慢&超时).分析后定位到是由于锁等待造成的.分析过程如下: 1.执行show proce ...
- iTween_ValueTo函数
ValueTo:返回一个插值在两件值之间的值供回调函数使用; 网上没找到例子,自己试了下,直接看代码就明白了. , 0, 0),// gameObject.transform.position为0.0 ...
- 关于IoCallDriver
通常我们所知IoCallDriver是把irp传递给下一层设备,传递到底是什么意思呢?IoCallDriver中实际调用了IopfCallDriver,其代码如下:NTSTATUSFORCEINLIN ...
- phpcms:八、show.html
标题:{$title}来源:{$copyfrom}评论:<a href="#comment_iframe" id="comment">0</a ...
- 升级 pip版本
安装第三方库:pip install Pillow 出现 You are using pip version 7.1.2, however version 9.0.1 is available. Yo ...
- 手动同步chrome浏览器
chrome浏览器每次设置好的标签在重新开机后都会变回设置前的状态,崩溃,每次设置好后还是手动同步一下吧. 1. 点击 工具(右上角的三个点)-->设置 2. 点击 高级同步设置 3. 点击 使 ...
- PHP的错误处理方式
错误类型 PHP 主要有两种错误:触发错误和异常.其中触发错误大概可以分为:编译错误.引擎错误和运行时错误,其中前两个是无法捕获的:异常都是可以捕获的,当没有尝试捕获时则会中断代码. 触发错误可以通过 ...
- 在Servlet中使用spring注入的bean
package abu.csdn.servlet; import java.io.IOException; import javax.servlet.ServletContext; ...