社区
Web 开发
帖子详情
document.getElementById
hexudonghot
2009-04-03 06:35:53
document.getElementById("emplId").select();
document.getElementById("emplId").focus();
那位大虾能帮我解释下上面两个方法的具体的意思 ?
...全文
102
16
打赏
收藏
document.getElementById
document.getElementById("emplId").select(); document.getElementById("emplId").focus(); 那位大虾能帮我解释下上面两个方法的具体的意思 ?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
16 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hexudonghot
2009-04-07
打赏
举报
回复
因为分不多 有的朋友可能 没散到分,深表抱歉,谢谢大家的回复
chenkaiwei_9988
2009-04-06
打赏
举报
回复
4楼的正解
YL_Show
2009-04-06
打赏
举报
回复
[Quote=引用 12 楼 InTheLongRun 的回复:]
document.getElementById("emplId").select(); //id为empId的元素中的内容被选中
document.getElementById("emplId").focus(); id为empId的元素中获得焦点
[/Quote]
同意
zhangxvshuo
2009-04-05
打赏
举报
回复
up同意楼上的
InTheLongRun
2009-04-05
打赏
举报
回复
document.getElementById("emplId").select(); //id为empId的元素中的内容被选中
document.getElementById("emplId").focus(); id为empId的元素中获得焦点
myairland
2009-04-05
打赏
举报
回复
推荐
www.w3school.com.cn
基本知识要学好
yanhui007
2009-04-05
打赏
举报
回复
document.getElementById("emplId").select(); //id为empId的元素中的内容被选中
document.getElementById("emplId").focus(); id为empId的元素中获得焦点
同意这个说法
藍色_斯坦福橋
2009-04-03
打赏
举报
回复
[Quote=引用 4 楼 wangfengpp2004 的回复:]
没什么可说的!UP
藍色_斯坦福橋
2009-04-03
打赏
举报
回复
[Quote=引用 4 楼 wangfengpp2004 的回复:]
没什么可说的!UP
simpledong
2009-04-03
打赏
举报
回复
内容被选中以及获取焦点
nexic
2009-04-03
打赏
举报
回复
无回帖。
不新闻。
onebody
2009-04-03
打赏
举报
回复
同上,
wangfengpp2004
2009-04-03
打赏
举报
回复
document.getElementById("emplId").select(); //id为empId的元素中的内容被选中
document.getElementById("emplId").focus(); id为empId的元素中获得焦点
hexudonghot
2009-04-03
打赏
举报
回复
emplId 是我在前面定义的一个字段
hexudonghot
2009-04-03
打赏
举报
回复
emplId 是我在前面定义的一个字段
不规则TAB选项卡效果
<script type=text/javascript> function setTab03Syn ( i ) { selectTab03Syn(i); } function selectTab03Syn ( i ) { switch(i){ case 1:
document
.
getElementById
("TabTab03Con1").style.display="block";
document
.
getElementById
("TabTab03Con2").style.display="none";
document
.
getElementById
("TabTab03Con3").style.display="none";
document
.
getElementById
("font1").style.color="#000000";
document
.
getElementById
("font2").style.color="#ffffff";
document
.
getElementById
("font3").style.color="#ffffff"; break; case 2:
document
.
getElementById
("TabTab03Con1").style.display="none";
document
.
getElementById
("TabTab03Con2").style.display="block";
document
.
getElementById
("TabTab03Con3").style.display="none";
document
.
getElementById
("font1").style.color="#ffffff";
document
.
getElementById
("font2").style.color="#000000";
document
.
getElementById
("font3").style.color="#ffffff"; break; case 3:
document
.
getElementById
("TabTab03Con1").style.display="none";
document
.
getElementById
("TabTab03Con2").style.display="none";
document
.
getElementById
("TabTab03Con3").style.display="block";
document
.
getElementById
("font1").style.color="#ffffff";
document
.
getElementById
("font2").style.color="#ffffff";
document
.
getElementById
("font3").style.color="#000000"; break; } }
js中
document
通过ID获取的一些使用方法
js中
document
通过ID获取的一些使用方法
document
.
getElementById
("link").href;
document
.
getElementById
("link").target;
document
.
getElementById
("img").src;
document
.
getElementById
("img").width;
document
.
getElementById
("img").height;
document
.
getElementById
("input"...
2021-02-18
var btn =
document
.
getElementById
(“a4”); var usne =
document
.
getElementById
(“username”);var psw =
document
.
getElementById
(“password”);var usneTips1 =
document
.
getElementById
(“username-tips1”);var usneTips2 =
document
.
getElementById
(“username-tips2”);var ps
js
document
.
getElementById
$()
function getObject(objectId) { if(
document
.
getElementById
&&
document
.
getElementById
(objectId)) { return
document
.
getElementById
(objectId); } else if
Web 开发
81,077
社区成员
341,831
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章