求一段代码! 怎么才能实现开始的时候div是隐藏的当我把光标挪到下一个文本框中之后上一个文本框的div就会显示! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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=utf-8" /><title>无标题文档</title><style>*{margin:0; padding:0;}</style></head><body> <input id="text" type="text" /> <div id="d" style="width:100px; height:100px; background:#000; display:none; color:#fff;">我是显示出来的DIV</div> <script> var t = document.getElementById('text'); t.onfocus = function(){ document.getElementById('d').style.display = 'block'; }; t.onblur = function(){ document.getElementById('d').style.display = 'none'; }; </script></body></html> <html><head><title>111</title><script language="javascript">function showdiv(){ document.getElementById("div1").style.visibility="visible";}</script></head><input type="text" onblur="showdiv()"/><div id="div1" style="visibility:hidden;"/>文字</div><br/><input type="text"/></body></html> sencha touch2 中的调色板工具在哪里 怎么加载本地JS文件? 求救~高手请进,页面刷新后无法恢复原始状态 用dom编程动态生成html,但onclick不反应,请帮忙? 请教一下,这个功能是怎么实现的 高分求:javascript中c#实现Server.UrlEncode(); 一个比较难的问题! 谁能帮我注解一段程度?,100分相赠送! javascript错误提示:“没有权限”???这是什么意思??? 如何用javascript控制光標指定在text輸入框的位置 js正则求教~~ 同样的代码,结果显示出来的结果不一样!在线等,急!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{margin:0; padding:0;}
</style>
</head><body>
<input id="text" type="text" />
<div id="d" style="width:100px; height:100px; background:#000; display:none; color:#fff;">我是显示出来的DIV</div>
<script>
var t = document.getElementById('text');
t.onfocus = function(){
document.getElementById('d').style.display = 'block';
};
t.onblur = function(){
document.getElementById('d').style.display = 'none';
};
</script>
</body>
</html>
<head>
<title>111</title>
<script language="javascript">
function showdiv(){
document.getElementById("div1").style.visibility="visible";
}
</script>
</head><input type="text" onblur="showdiv()"/><div id="div1" style="visibility:hidden;"/>文字</div><br/>
<input type="text"/>
</body>
</html>