菜鸟送分问题。!!! 按下是没有焦点的。我放了3个按钮,然后点击一个按钮,然后再按Tab键,焦点移动到地址栏去了。再按就移动到别处。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我放了3个按钮,然后点击一个按钮,(你按了按钮A,按钮A肯定获得焦点)然后再按Tab键,焦点移动到地址栏去了(是这样的,但你不能说按钮A没有获得焦点)唉... 你可以用你的button对象的focus方法看看你点按钮是不是获得了焦点 <!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=gb2312" /><title>无标题文档</title><script type="text/javascript"> function myclick() { alert("随便去做一些事情"); var mybutton=event.srcElement; mybutton.focus(); }</script></head><body><input id="button1" type="button" value="button1" /><input id="button2" type="button" value="button2" onclick="myclick();" /><input id="button3" type="button" value="button3" /></body></html> 急,,急。。急急..谁能帮我看下这代码写的是什么意思,在线等。 如何在jsp页面中实现导出到excel功能? js脚本改变样式存入cookie 刚开始使用jquery,问个语句 想用ASP或JS生成与PHP中的MD5函数结果一致的校验码,如何实现? 大家帮我看看这段JavaScript代码错在哪? jsp+js:单选按钮、复选框有分组,个数不确定,如何验证每组是否选择? 在线PPT功能,piktochart.com 这个使用了什么技术完成? 如何关闭对话框 在线等,javascrpt问题。 Firefox的兼容性问题。 帮忙看看初始运行的小问题!!!
唉...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function myclick()
{
alert("随便去做一些事情");
var mybutton=event.srcElement;
mybutton.focus();
}
</script>
</head><body>
<input id="button1" type="button" value="button1" />
<input id="button2" type="button" value="button2" onclick="myclick();" />
<input id="button3" type="button" value="button3" />
</body>
</html>