📄 test.html
字号:
<html>
<head>
<title>test</title>
<script type="text/javascript" language="JavaScript">
<!--
var inputName;
function myTest(inName)
{
var newHtml = null;
var a = window.screenTop+123-29;
var b = window.screenLeft + document.body.scrollWidth/2 - 95;
if(newHtml==null)
{
newHtml = window.open("dataSend.html","abc","top="+a+",left="+b+",width=190,height=200,menubar=no,status=no,scrollbars=no,resizable=no,toolbar=no,location=no");//弹出一个新网页
this.blur();//失去焦点,如果不失去焦点会一直弹出页面
inputName=inName.name;//这个比较关键,inName是传过来的this指针,this指针不是与生俱来的志向调用者,是通过传参数的形势过来的
}
}
function myTest2(sendDataTime)
{
window.document.all(inputName).value=sendDataTime;//这个也很重要,all(是指向name属性的,根据name属性来对其操作)
//这么做的好处是可以根据不同的调用者来赋给不同调用者值
}
// -->
</script>
</head>
<body>
<br>
<table>
<tr>
<td class="tdbgcolorqueryright">开始时间</td>
<td class="tdbgcolorqueryleft"><input name="beginDate" type="text" onFocus="myTest(this)" readonly="readonly"></td>
<td class="tdbgcolorqueryright">结束时间</td>
<td class="tdbgcolorqueryleft"><input type="text" name="endDate" value="" onFocus="myTest(this)" readonly="readonly"></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -