文本框样式代码

用C#语言实现记事本 Timer控件的Name属性设为“tmrNotepad”,Enabled(激活的可行的)属性设为“True”,Interval(间隔,间距,幕间时间)属性设为“1000”,表示1秒种触发一次Tick事件,即1秒钟改变一次时钟。下拉列表中保留默认的选择“StatusLabel”,然后单击【添加】按钮,依次添加2个StatusLabel,并分别命名为“tssLbl1”和“tssLbl2”,再将tssLbl1的Text属性设为“就绪”, tssLbl2的Text属性设为“显示日期、时间”。 阅读详情

只有下划线的文本框:
<input style="border:0;border-bottom:1 solid black;background:;">

软件序列号式的输入框:
<script for="T" event="onkeyup">
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
</script>
<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T7" size="5" maxlength="3">

软件序列号式的输入框(完整版):
<script for="T" event="onkeyup">if(value.length==maxLength)document.all[event.srcElement.sourceIndex+1].focus();</script>
<script for="T" event="onfocus">select();</script>
<script for="Submit" event="onclick">
var sn=new Array();
for(i=0;i<T.length;i++)
sn=T.value;
alert(sn.join("—"));
</script>
<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">
<input type="submit" name="Submit">

输入框景背景透明:
<input style="background:transparent;border:1px solid #ffffff">

鼠标划过输入框,输入框背景色变色:
<INPUT value="Type here" NAME="user_pass" TYPE="text" SIZE="29" onmouseover="this.style.borderColor='black';this.style.backgroundColor='plum'"
style="width: 106; height: 21"
onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" style="border-width:1px;border-color=black">

输入字时输入框边框闪烁(边框为小方型):
<Script Language="JavaScript">
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
</Script>
<input type="text" id="oText" style="border:5px dotted red;color:red" onfocus="borderColor(this);" onblur="clearTimeout(oTime);">

输入字时输入框边框闪烁(边框为虚线):
<style>
#oText{border:1px dotted #ff0000;ryo:expression(onfocus=function light (){with(document.all.oText){style.borderColor=(style.borderColor=="#ffee00"?"#ff0000":"#ffee00");timer=setTimeout(light,500);}},onblur=function(){this.style.borderColor="#ff0000";clearTimeout(timer)})};
</style>
<input type="text" id="oText">

自动横向廷伸的输入框:
<input type="text" style="huerreson:expression(this.width=this.scrollWidth)" value="abcdefghijk">

自动向下廷伸的文本框:
<textarea name="content" rows="6" cols="80" onpropertychange="if(this.scrollHeight>80) this.style.posHeight=this.scrollHeight+5">输入几个回车试试</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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>鼠标经过文本响应效果</title>
<style type="text/css">
<!--
body {
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 text-align:center;
}
input{
    margin:0;
 padding:0;
 border:0;
 }
p{
    width:400px;
 }
.TextBoxNone
{
 border: none;
 margin-right: 10px;
 background: none;
 cursor: text;
 margin-bottom: 1px;
}
.TextBox
{
 border: none;
 padding: 6px 0 6px 9px;
 font-size: 8pt;
 font-family: Tahoma;
 background-image: url(http://www.i593.com/divcss/kuang/images/textbox_bg.gif);
 background-repeat: no-repeat;
 background-position: left -1px;
 margin:20px auto;
 width:260px;
 text-align:left;
}
.TextBoxFocus
{
 border: none;
 padding: 6px 0 6px 9px;
 font-size: 8pt;
 font-family: Tahoma;
 background-image: url(http://www.i593.com/divcss/kuang/images/textbox_bg.gif);
 background-repeat: no-repeat;
 background-position: left -40px;
 margin:20px auto;
 width:260px;
    text-align:left;
}
-->
</style></head>
<body>
<h1>鼠标经过文本响应效果</h1>
<p>很酷的文本框响应效果,下面是实例。代码很简单,原理是用CSS设置input边框为无,然后在为DIV设置一个背景作为文本框边框,为DIV设置鼠标经过和鼠标经过两个状态。当鼠标经过时更改div背景实现文本框鼠标经过响应效果。</p>
<div class="TextBox" onmouseover="this.className='TextBoxFocus'" onmouseout="this.className='TextBox'">
                                            <input name="ctl00$PageContent$tbURL" type="text" size="29" id="ctl00_PageContent_tbURL" class="TextBoxNone" />
                                           
                                            <label></label>
                                            <label></label>
                                            <input type="submit" name="Submit" value="提交" />
</div>
</body>
</html>

 

 

 

 

 

 

 

 

<html> 

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<title>新建网页 1</title> 
<style> 
<!-- 
.username { width:130px; background:#FFFFFF url("/article/upimages/ico_username.gif") 2px 2px no-repeat; padding-left:18px;BORDER-RIGHT: #E7AD01 1px solid; BORDER-TOP: #E7AD01 1px solid; FONT-SIZE: 13px; BORDER-LEFT: #E7AD01 1px solid; COLOR: #000000; BORDER-BOTTOM: #E7AD01 1px solid; HEIGHT: 20px } 
--> 
</style> 
</head> 

<body> 

<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table1"> 
    <tr> 
        <form name="myform" method="post" action=""> 
            <td class="login_td">用户名:<input class="username" onmouseover="this.style.borderColor='#99E300'" onmouseout="this.style.borderColor='#A1BCA3'" maxLength="12" name="UserName"></td> 
        </form> 
    </tr> 
    </table> 

</body> 

</html>

 

 

 

 

 

输入框景背景透明:
<input style="background:transparent;border:1px solid #ffffff">
------------------------------------------------------------------------------------------
鼠标划过输入框,输入框背景色变色:
<INPUT value="Type here" NAME="user_pass" TYPE="text" SIZE="29" onmouseover="this.style.borderColor='black';this.style.backgroundColor='plum'"
style="width: 106; height: 21"
onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" style="border-width:1px;border-color=black">
------------------------------------------------------------------------------------------
输入字时输入框边框闪烁(边框为小方型):
<Script Language="JavaScript">
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
</Script>
<input type="text" id="oText" style="border:5px dotted red;color:red" onfocus="borderColor(this);" onblur="clearTimeout(oTime);">
----------------------------------------------------------------------------------------------
输入字时输入框边框闪烁(边框为虚线):
<style>
#oText{border:1px dotted #ff0000;ryo:expression(onfocus=function light (){with(document.all.oText){style.borderColor=(style.borderColor=="#ffee00"?"#ff0000":"#ffee00");timer=setTimeout(light,500);}},onblur=function(){this.style.borderColor="#ff0000";clearTimeout(timer)})};
</style>
<input type="text" id="oText">
----------------------------------------------------------------------------------------------
自动横向廷伸的输入框:
<input type="text" style="huerreson:expression(this.width=this.scrollWidth)" value="abcdefghijk">
----------------------------------------------------------------------------------------------
自动向下廷伸的文本框:
<textarea name="content" rows="6" cols="80" onpropertychange="if(this.scrollHeight>80) this.style.posHeight=this.scrollHeight+5">输入几个回车试试</textarea>
----------------------------------------------------------------------------------------------
文本框失效:
<input type="text" disabled>
----------------------------------------------------------------------------------------------
只有下划线的文本框:
<input style="border:0;border-bottom:1 solid black;background:;">
----------------------------------------------------------------------------------------------
软件序列号式的输入框:
<script for="T" event="onkeyup">
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
</script>
<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T7" size="5" maxlength="3">
软件序列号式的输入框(完整版):
----------------------------------------------------------------------------------------------
<script for="T" event="onkeyup">if(value.length==maxLength)document.all[event.srcElement.sourceIndex+1].focus();</script>
<script for="T" event="onfocus">select();</script>
<script for="Submit" event="onclick">
var sn=new Array();
for(i=0;i<T.length;i++)
sn=T.value;
alert(sn.join("—"));
</script>
<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">
<input type="submit" name="Submit">

 

 

 

 

 

 

 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>发帖文本框特效</title>
<style type="text/css">
<!--
*{margin:0;padding:0;}
body{font-size:12px;color:#333;text-align:center;font-family:'宋体',arial,verdana,sans-serif}
ul{list-style:none;}
.p_abs{position:absolute;}
.qhui{color:#9a9a9a;}
#fbcomment{height:152px;text-align:left;width:100%;}
#fbcomment .text{float:left;width:420px;}
#fbcomment .text textarea{width:97%;height:80px;margin-bottom:5px;}
#fbcomment .text .guest{top:5px;left:35px;width:335px;height:72px;background:url(http://img.ku6.com/www/new/img/guest.jpg) no-repeat;}
#fbcomment .text .guest dl{margin:6px 0 5px 40px;line-height:150%;}
-->
</style>
</head>
<body>
<script type="text/javascript" id="KU6_JS_LOADER">
function loadJS(ts){if(!ts){return;}var _2=document.getElementById("KU6_JS_LOADER");for(var i=0;i<ts.length;i++){var _4=ts[i];var _f=false;for(var j=0;j<_2.length;j++){var _s=_2[j].getAttribute("src");if(_s&&_s==_4){_f=true;break;}}if(!_f){document.write("<scr"+"ipt type=/"text/javascript/" src=/""+_4+"/"></scr"+"ipt>");}}}
CSL = ['http://js.ku6.com/common/prototype.js'];
loadJS(CSL);
</script>
<div id="fbcomment">
<div class="text">
<textarea name="comment_txt" id="comment_txt" rows="5" class="b4" onFocus="$('cmt_tipDiv').hide();" title=""  ></textarea>
<div class="guest p_abs qhui" id="cmt_tipDiv" onClick="$('cmt_tipDiv').hide();$('comment_txt').focus();">
<dl>
<dt>蓝旗温馨提醒:
<dd>1、请勿发表违反国家法律评论,评论请文明用语;</dd>
<dd>2、禁止发布广告评论。</dd>
</dl>
</div>
</div>
</div>
</body>
</html>

 

 

 

 

 

 

WPF-带清除按钮的文本框(更新水印效果) http://luacloud.com/2011/wpf-textbox-clearbutton-watermark.html 带水印,带清除按钮的TextBox 先发个牢骚!!!NND,一个上午都毁在Text属性上了!!! 我就是打算做一个带有清除按钮的文本框,这样,我写好了样式,可以在别的地方通用,省去了每个都到后台写清空代码的麻烦。 于是,参照这昨天写的 《WPF-没事做了个圆... 阅读详情

相关推荐

VB文本框操作代码

文本框限制(只能输入汉字、数字、首位不能输入0,可修改) .文本框加入指定文字 文本框删除文字 去除文本框里所有的空格

java:文本框的简单使用

标题一、关键代码二、简单说明三、流程图四、源码(一)、源码A(二)、源码A的运行效果五、结语六、定位日期 一、关键代码 新建一个文本框。代码为JTextField j_tf=new JTextField(A);。对于A,可以设置为数值,比如当A为20的时,则表示文本框j_tf的宽度为20个字符。当然不想在括号里添加数值,也可以另外编写代码j_tf.setColumns(20);也可以。 A除了编写数值,也可以编写字符串内容,比如"默认初始显示的字符串",这也是文本框编译后,初始显示的字符串内容。此外,也可

小蜗牛764号的博客 1万+

保姆级教程:在SIwave 2024 R2中搞定TDR仿真,手把手教你分析USB 3.0差分线阻抗

本文提供了一份详细的SIwave 2024 R2 TDR仿真教程,重点讲解如何分析USB 3.0差分线阻抗。从项目准备、参数配置到结果分析,逐步指导工程师完成完整的仿真流程,并分享实战经验和高级技巧,帮助提升信号完整性分析能力。

weixin_33670786的博客 505

HTML创建文本框的三种方式

的初始值必须要放在和

kt1776133839的博客 2万+

FusionCompute8.0.0实战指南:从零部署CNA与VRM环境

本文以华为FusionCompute 8.0.0为例,详细介绍了如何利用老旧硬件从零开始部署CNA计算节点与VRM管理节点的完整实战指南。内容涵盖实验环境准备、CNA安装与网络配置、VRM虚拟机部署方案对比,并提供了典型故障排查与性能调优技巧,帮助读者低成本构建可用的虚拟化学习环境。

weixin_29306317的博客 319

经典蓝牙中的Sniff、Hold与Park模式

若主设备在Sniff Attempt窗口外发送数据,从设备无法接收,需依赖重传机制。移动时立即传输数据。:Sniff Interval=20ms,Attempt=1时隙。:传感器每2秒唤醒一次同步信标,主设备按需唤醒特定传感器采集数据。Slave进入Sniff模式:每20ms唤醒1个时隙监听数据。:设备需要短暂执行高优先级任务(如扫描其他蓝牙设备)。:无数据传输超时后,设备可能自动进入Sniff模式。:主设备通过信标唤醒从设备,或从设备主动请求退出(:平衡功耗与响应速度,适合间歇性数据传输设备。

shishuangquan111的博客 1683

TextBox控件的多样边框实现

一个很简单的例子,重载TextBox,主要功能:当BorderStyle为FixedSingle时:可以设置TextBox边框颜色;可以设置当鼠标Over或Leave控件的时候,TextBox边框颜色变化,以及是否启用这种HotTrack。TextBoxXP.csusing System; using System.ComponentModel; using System.Coll

天将降大任于斯人也 2242

登临科技Goldwasser加速卡Python SDK实战:从环境配置到YOLOv5模型性能压测

本文详细介绍了登临科技Goldwasser加速卡的Python SDK实战指南,从环境配置到YOLOv5模型性能压测的全过程。通过驱动安装、SDK环境搭建、模型转换与推理优化等步骤,帮助开发者高效利用AI加速卡提升深度学习模型性能。重点分享了批量推理压测技巧和常见问题解决方案,助力开发者充分发挥Goldwasser加速卡的算力优势。

weixin_29035147的博客 308

多行文本框的认识以及代码详解

多行文本框< textarea>< /textarea>是什么呢? 单行文本框只能输入一行信息,而多行文本框可以输入多行信息。比如说在百度搜索栏写再多的内容都不会换行,例如是个人信息,兴趣爱好等内容多的就会用到这个文本框。 属性: cols:这文字区块的宽度 rows:这文字区块的行数,即其高度 < textarea name="" id="" cols="30" rows="10">< /textarea> 代码示例: < body> <

sxtweb的博客 4552

实战避坑:示波器测量非隔离开关电源的炸机风险与隔离方案

本文详细分析了使用示波器测量非隔离开关电源时的炸机风险,揭示了地线环路导致的短路问题,并对比了四种防炸机解决方案,包括示波器隔离供电、拔掉电源地线、使用差分探头和被测板隔离供电。重点推荐使用隔离变压器方案,确保测量安全与精度,同时提供了实操建议与经验分享,帮助工程师避免常见测量事故。

weixin_29224309的博客 577

Vitis Model Composer闪退?手把手教你用命令行启动Vivado 2021后的System Generator

本文详细解析了Vitis Model Composer闪退问题的根本原因,并提供了命令行启动Vivado 2021后System Generator的完整解决方案。从环境变量配置、组件缺失排查到权限问题处理,手把手教你通过命令行深度排错,并分享高级自动化脚本和系统优化技巧,帮助开发者高效使用Vitis Model Composer与System Generator进行HDL开发。

weixin_26905487的博客 358

怎样美化html文本框,HTML/css文本框样式美化代码

HTML/CSS文本框样式美化代码输入框景背景透明:鼠标划过输入框,输入框背景色变色:style="width:106;height:21"onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'"style="border-width:1px;border-color=black"&g...

weixin_28767599的博客 3186

SAP采购申请审批策略配置简介

SAP采购申请审批策略配置简介 1、CT04创建特征

我小时候很黑的博客 8175

HTML中文本框协议,css设置input文本框样式代码实例_html/css_WEB-ITnose

css设置input文本框样式代码实例:使用css设置input元素的样式是最为常用的操作之一,当然也是最为基础的操作,可能对于刚刚接触css的朋友还不够熟悉,下面就通过一段简单的代码历史演示一下如何设置文本框的样式,当然这个演示可能并不是特别的美观,这里的目的也只是起到一个演示作用,代码如下:蚂蚁部落以上代码对文本框进行了设置,下面介绍一下设置项目:1.使用width可以设置文本框的宽度。2.使...

weixin_28675661的博客 754

倍福--TwinSAFE功能块的使用

在安全模块的程序设计中,输入变量取反,或者把PLC的变量连接到安全的功能块程序中, 操作流程 1.1. 功能块输出取反 例如修改IN,右击属性,然后可在Single-Channel选项中选择是NO还是NC的输入信号。 1.2. PLC标准变量作为安全程序的输入 1.2.1. 建立两个PLC变量 1.2.2. 安全程序区创建变量 1.2.3. 功能块变量链接 首先,PLC变量不能直接连到Estop功能块的输入变量中,否则会报错,但PLC可以连接到SafeAnd这些功能块,然后再转出来,如下所示

weixin_41883890的博客 5323

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

html文本框样式大全,HTML文本框样式(示例代码)

1 输入框景背景透明:2 34 鼠标划过输入框,输入框背景色变色:5 6 style="width: 106; height: 21"7 onmouseout="this.style.borderColor=‘black‘;this.style.backgroundColor=‘#ffffff‘"style="border-width:1px;border-color=black">89 输...

weixin_30794381的博客 1560

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

html的文本框选中样式,HTML实用文本框样式(示例代码)

输入框景背景透明:鼠标划过输入框,输入框背景色变色:输入字时输入框边框闪烁(边框为小方型):functionborderColor(){if(self[‘oText‘].style.borderColor==‘red‘){self[‘oText‘].style.borderColor= ‘yellow‘;}else{self[‘oText‘].style.borderColor= ‘red‘;}o...

weixin_39915815的博客 821

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

java文本框无法聚焦_文本框input聚焦失焦样式实现代码

摘要:这篇JavaScript栏目下的“文本框input聚焦失焦样式实现代码”,介绍的技术点是“input、实现代码、文本框、文本、实现、代码”,希望对大家开发技术学习和问题解决有帮助。首先用css的伪类:focus可以改变。文本框的 html代码假设如下:Name: Password: Textarea: css 代码这样写:input[type="text"]:focus, input[typ...

weixin_31201555的博客 316

html input文本框样式,css设置input文本框样式代码实例_html/css_WEB-ITnose

css设置input文本框样式代码实例:使用css设置input元素的样式是最为常用的操作之一,当然也是最为基础的操作,可能对于刚刚接触css的朋友还不够熟悉,下面就通过一段简单的代码历史演示一下如何设置文本框的样式,当然这个演示可能并不是特别的美观,这里的目的也只是起到一个演示作用,代码如下:蚂蚁部落以上代码对文本框进行了设置,下面介绍一下设置项目:1.使用width可以设置文本框的宽度。2.使...

weixin_34722015的博客 1474

各种各样的文本框滚动栏样式代码 滚动栏样式 文本框样式(文本框样式大全)...

&lt;div style="WIDTH: 148; HEIGHT: 146; BACKGROUND-COLOR: transparent; OVERFLOW: scroll; scrollbar-face-color: #FFFFFF; scrollbar-shadow-color: #885C10; scrollbar-highlig...

weixin_34049948的博客 474

input文本框样式代码实例

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>新建网页 1</title> <style> <!-- .username { width:130px; ...

weixin_30871701的博客 231

textarea文本框强制去掉滚动条的样式代码

textarea{ overflow:auto; } 转载于:https://www.cnblogs.com/may-374/archive/2013/05/27/3102253.html

weixin_30458043的博客 396

【转】文本框样式

1、只有下划线的文本框:&lt;input style="border:0;border-bottom:1 solid black;background:;"&gt; 2、软件序列号式的输入框:&lt;script for="T" event="onkeyup"&gt;if(value.length==3)document.all[event.srcElement.sourceIndex+1]....

weixin_34262482的博客 101

13种常用按钮、文本框、表单等CSS样式

虽然CSS样式的学习需要我们动手多实践,需要多做案例,思致思考,但有时候注意资料的收集与整理也是非常重要的,在实际开发中往往会起到事半功倍的效果。下面一些关于按钮、文本框、表单的常用CSS样式。大家可以参考。一、按钮样式.buttoncss {    font-family: "tahoma", "宋体"; /*www.52css.com*/    font-size:9pt; c

Yvan's 857

各种文本框样式总结

输入框景背景透明: 鼠标划过输入框,输入框背景色变色:style="width: 106; height: 21" onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" style="border-width:1px;border-color=bl...

weixin_34416754的博客 1241
上一篇: 增加XP的IIS连接数,解决403.9连接用户过多的问题
下一篇: 文本框限制输入
魔拉宝
博客等级 码龄20年 133粉丝 119原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值