会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
龍峸
Asp.Net - jQuery
博客园
首页
新随笔
联系
管理
订阅
input高级用法
1
.取消按钮按下时的虚线框
在input里添加属性值 hideFocus 或者 HideFocus
=
true
2
.只读文本框内容
在input里添加属性值
readonly
3
.防止退后清空的TEXT文档(可把style内容做做为类引用)
<
INPUT style
=
behavior:url(#
default
#savehistory); type
=
text id
=
oPersistInput
>
4
.ENTER键可以让光标移到下一个输入框
<
input
>
5
.只能为中文(有闪动)
<
input
>
6
.只能为数字(有闪动)
<
input
>
7
.只能为数字(无闪动)
<
input style
=
"
ime-mode:disabled
"
>
8
.只能输入英文和数字(有闪动)
<
input
>
9
.屏蔽输入法
<
input type
=
"
text
"
name
=
"
url
"
style
=
"
ime-mode:disabled
"
>
10
. 只能输入 数字,小数点,减号(
-
) 字符(无闪动)
<
input
>
11
. 只能输入两位小数,三位小数(有闪动)
<
input maxlength
=
9
id
=
text_kfxe name
=
text_kfxe
>
------------------------------------------------------------------------
<
input type
=
"
text
"
name
=
"
input1
"
value
=
"
中国
"
>
怎样使input中的内容为只读,也就是说不让用户更改里面的内容。
<
input type
=
"
text
"
name
=
"
input1
"
value
=
"
中国
"
.blur()
>
<
input type
=
"
text
"
name
=
"
input1
"
value
=
"
中国
"
readonly
>
<
input type
=
"
text
"
name
=
"
input1
"
value
=
"
中国
"
disabled
>
最好不要用disabled,不然就无法取出里面的值了.
<
input type
=
"
text
"
name
=
"
input1
"
value
=
"
中国
"
read
>
<
input type
=
"
text
"
name
=
"
input1
"
value
=
"
中国
"
readonly
style
=
"
color:#999 ;
"
>
posted @
2008-02-14 18:20
龍峸.大卫
阅读(
222
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告