0

当您在文本框内单击时,将打开一个窗口。如果您使用键盘上的选项卡按钮从另一个文本框进入有问题的文本框,您如何获得相同的效果?

Javascript

<script language="JavaScript">
    function openwindow()
    {
    window.open('foo.php', 'newwindow', 'width=xxx,height=xxx,scrollbars=yes');
    }
</script>

HTML

<input name="test" id="test" type="text" onclick="location.href='javascript:openwindow()';" target="_blank" size="12">
4

1 回答 1

0

试试焦点

<input name="test" id="test" type="text" onFocus="location.href='javascript:openwindow()';" target="_blank" size="12">
于 2013-08-31T06:00:32.103 回答