社区
JavaScript
帖子详情
怎么在Input type="text"中设置光标的位置
Hyena_lei
2002-12-30 11:00:04
比如现在输入内容是abcdef,我要不把光标定为c字符后,如何做?
...全文
235
2
打赏
收藏
怎么在Input type="text"中设置光标的位置
比如现在输入内容是abcdef,我要不把光标定为c字符后,如何做?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
goldensai
2003-04-07
打赏
举报
回复
HAHA
djstudio
2002-12-30
打赏
举报
回复
试一下下面的代码:
text1.focus();
var oRange=document.selection.createRange();
oRange.move("character",3);
oRange.select();
大爷,行行好,给点分吧
input
输入框
光标
问题
使用readonly使
type
=
text
或
type
= password的
input
禁止输入,在谷歌
中
无
光标
,且不可输入;在火狐、IE下有
光标
,且不可输入。 二、问题截图 <
input
type
="
text
" readonly="readonly"&...
如何给
input
中
type
="
text
"
设置
css
input
[
type
="
text
"],
input
[
type
="password"] { border: 1px solid #ccc; padding: 2px; font-size: 1.2em; color: #444; width: 200px; }
解决
input
type
=password的历史记录和自动填充问题
基于现在的浏览器很多都有记住密码的功能,所以很多的时候输入框会自动填充,但是在开发过程
中
,也会有用户觉得存在安全问题,下面是几种去除自动填充和历史记录的方法: autocomplete=“off” <
input
type
=...
html5
input
键盘搜索,
input
type
="search" 实现搜索框
效果如下:开始~inpu需的请本现等现近求项求人这行的近求项求人t
type
=
text
并不能达到这种效果,google了一下,html5 增加的
type
=search可以做到(但需要
input
type
=search外面包上一层带action属性的浏刚学互久维数曾...
Edit
Text
中
android:
input
Type
="number"遇到的坑
Edit
Text
中
android:
input
Type
="number"遇到的坑 一次Android作业要修改字体大小,首先在Edit
Text
中
让用户输入数字,我在布局文件
中
加入 &lt;
Text
View android:id="@+id/tv3&...
JavaScript
87,907
社区成员
224,614
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章