asp学习网: 首页 >> css教程 >> css实例 >> css优化表单域(设置textarea背景等)

css优化表单域(设置textarea背景等)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cn" lang="cn">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=gbk"/>
<style type="text/css">
.fab{width:440px;height:100px;font-size:12px;padding:3px;background: #f8f9ff url(www.aspxuexi.com/skins/tim/isll_t.gif) no-repeat;border: 1px solid #c4c9fd;color:#6C63A3}
.fabt{width:440px;height:100px;font-size:12px;padding:3px;border:1px solid #f7ca06;background:#fffbca;color:#cb6a24}
.fabtt{width:440px;height:100px;font-size:12px;padding:3px;background: #f8f9ff;border: 1px solid #c4c9fd;color:#6C63A3}
</style>
</script>
</head>
<body>
<textarea name="v_content" id="v_content" class="fab" onblur="this.className='fabtt'" onfocus="this.className='fabt'" onkeydown="ctrlenterkey(event);" onfocus="if (securitycodejs!=null){document.getElementById('showsecuritycode').innerHTML=securitycodejs; securitycodejs=null;}"></textarea>
</body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>cssrain</title>
<style type="text/css">
<!--
.textarea {width:300px;height:70px;background:url(www.aspxuexi.com/skins/tim/isll_t.gif) no-repeat right top; }
.textfield {width:300px;height:18px;background-image:url(www.aspxuexi.com/skins/tim/isll_t.gif);color:#ccc;border:solid 1px #999;padding:0px 0px 0px 0px;}
-->
</style>
</head><body>
<br />
<br />
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="29"><input name="search" type="text" id="search" class="textfield" onfocus="if(this.value=='关键字') {this.value='';}this.style.color='#333';" onblur="if(this.value=='') {this.value='关键字';this.style.color='#ccc';}" value="关键字" maxlength="30"/></td>
</tr>


<tr>
<td height="82"><textarea name="textarea" class="textarea"></textarea></td>
</tr></table>
</body>
</html>
from:asp学习网/title:css优化表单域(设置textarea背景等)/ time:2007-12-23 19:45:07

本文主题表单

表单(Form)提交检验通用javascript函数

javascript表单之间的数据传递

ASP.NET中的XML表单控件

自动提交表单的方法

ASP.NET 表单验证:代码及讲解

按Enter键时如何避免表单自动提交

Ajax 動態清單(动态表单 繁体中文文档)

text?select?即可输入文本又可下拉选择的表单项 最佳实现方案

asp教程 ©2006-2007 aspxuexi.com | 关于站点 | 版权隐私 | 站内搜索
复制或者翻版 请于夜间进行