输入框景背景透明:

 <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 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输入框的各种样式的更多相关文章

  1. input输入框外联式样式控制不了字体

    1.问题背景 在做项目过程中,发现input输入框利用外联样式,控制不了输入框的样式 2.问题原因 (1)HTML代码 <!DOCTYPE html> <html> <h ...

  2. 手机端实现6位短信验证码input输入框效果(样式及代码方法)

    微信移动端4位.6位.多位验证码密码输入框功能的实现代码,实现思路: 方案1: 写一个简单的input框. 评估:样式不好看,待定. 方案2: 就是用6个input框,每输入一个数字之后,切换到下一个 ...

  3. 修改input输入框的样式

    直接上代码 <style> .input{ -web-kit-appearance:none; -moz-appearance: none; font-size:1.4em; height ...

  4. css样式之input输入框默认样式

    帮朋友写个简单的课程设计,后面会贴出来,项目刚开始就遇到一个坑(给input输入框设定样式,但是,点击后会出现蓝色边框),之前写其他的项目时也遇到过,百度一下资料解决了,现在又碰到了,写一下,留着备用 ...

  5. (谷歌浏览器等)解决css中点击input输入框时出现外边框方法【outline:medium;】

    问题:在使用谷歌浏览器,360浏览器时,点击input输入框会出现带颜色的外边框,如下图所示:

  6. MVC4怎么设置@Html.TextBoxFor这样的输入框的css样式

    在传统webForm中,输入框的这样的: <input id="userName" name="userName" type="text&quo ...

  7. 认识input输入框的placeholder属性

    我们来认识下input输入框的placeholder属性. placeholder 属性提供可描述输入字段预期值的提示信息.(placeholder 属性适用于以下的 <input> 类型 ...

  8. CSS设置input placeholder文本的样式

    placeholder是HTML5  input的新属性,英文意思是占位符,它一般表示input输入框的默认提示值. 下面是设置placeholder的文本样式的选择器的示例: /* webkit 浏 ...

  9. input输入框和 pure框架中的 box-sizing 值问题

    在使用pureCSS框架的时候,遇到一个问题. input输入框,我给他们设置了宽度和padding值,我发现,在火狐和谷歌上面发现,增加padding值并不会影响最终的宽度,而在IE6 7下则会影响 ...

随机推荐

  1. [改善Java代码]建议采用的顺序是 List<T>、List<?>、List<Object>

    建议98:建议采用的顺序是 List<T>.List<?>.List<Object> List<T>.List<?>.List<Obj ...

  2. 关于Windows下如何查看端口占用和杀掉进程

    更详细博客参见: http://www.cnblogs.com/chenwenbiao/archive/2012/06/24/2559954.html 或可参考:http://www.cnblogs. ...

  3. 关于JDK中的集合总结(三)

    泛型: jdk1.5出现的安全机制. 好处: 1,将运行时期的问题ClassCastException转到了编译时期. 2,避免了强制转换的麻烦. <>:什么时候用?当操作的引用数据类型不 ...

  4. 关于Linux的总结(二)

    主要内容 Linux 安装 常用命令 VI编辑器的使用 远程登录 主机名的设置 IP的设置 防火墙的设置 用户和组账户管理 文件权限管理 RPM软件包管理 软件的安装 Jdk,tomcat, ecli ...

  5. hdu 1170 Balloon Comes!

    Balloon Comes! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)To ...

  6. Ubuntu中wine安装的程序如何卸载

    很多朋友尝试在Ubuntu中用wine安装exe格式的应用程序,但经常遇到装完之后启动程序就崩溃.或者根本无法启动.无法使用的情况,于是想立即把安装的程序卸载,可是在wine中却找不到卸载exe软件的 ...

  7. JAVA中RSS解析器(rome.jar和jdom.jar)范例

    1.需要 jdom.jar 和 rome.jar 这两个包.2.创建一个项目,web.xml的内容如下: 代码如下 复制代码 <?xml version="1.0" enco ...

  8. 第三十九篇、NavBar动态隐藏、设置透明、毛玻璃效果

    1.动态隐藏 - (void)viewDidLoad { [super viewDidLoad]; if ([self respondsToSelector:@selector(automatical ...

  9. 第三十三篇、富文本 NSMutableAttributedString

    // 设置颜色等 NSMutableDictionary *arrDic = [NSMutableDictionary dictionary]; arrDic[NSForegroundColorAtt ...

  10. Swift中的注释以及表达式

    Swift程序有两类注释:单行注释(//)和多行注释(/*...*/).注释方法与C.C++和Objective-C语言都是类似的,下面详细介绍一下.1. 单行注释单行注释可以注释整行或者一行中的一部 ...