不好意思,因为我对vbscript不熟,只好加了一点javascript的代码,可以解决,或者你照着看看,改成vbscript
<html>
<head>
<title>h1.html</title>
</head>
<body>
<form id="Form1" method="post">
<INPUT id="t3" style="Z-INDEX: 104; LEFT: 49px; WIDTH: 217px; POSITION: absolute; TOP: 141px; HEIGHT: 46px" type="text" size="30" onfocus=myfocus("t3")>
<INPUT id="t2" style="Z-INDEX: 103; LEFT: 55px; WIDTH: 217px; POSITION: absolute; TOP: 93px; HEIGHT: 46px" type="text" size="30" onfocus=myfocus("t2")>
<INPUT id="t4" style="Z-INDEX: 102; LEFT: 50px; WIDTH: 217px; POSITION: absolute; TOP: 188px; HEIGHT: 46px" type="text" size="30" onfocus=myfocus("t4")>
<INPUT id="t1" style="Z-INDEX: 101; LEFT: 57px; WIDTH: 217px; POSITION: absolute; TOP: 43px; HEIGHT: 46px" type="text" size="30" onfocus=myfocus("t1")>
<INPUT id="b1" style="Z-INDEX: 105; LEFT: 37px; WIDTH: 162px; POSITION: absolute; TOP: 239px; HEIGHT: 50px" type="button" value="Button"></form>
</form>
</body>

<script language="vbscript">
Sub b1_onclick()
Dim vRet, oMe 
Set oMe = Window
vRet = showModelessDialog ( _ 
"h2.html", _ 
oMe, _ 
"dialogHeight:340px;dialogWidth:450px;center:yes;status:no;resizable:no;help:no") 
Set oMe = Nothing 
End Sub
</script>
<script>
var myfocustext=null;
function myfocus(obj)
{
myfocustext=obj;
}
</script>
</html>
///////////////////////////////////
<html>
<head>
<title>h1.html</title>
</head>
<body>
<form id="Form1" method="post">
<INPUT id="b1" onclick=myset() style="Z-INDEX: 101; LEFT: 12px; WIDTH: 403px; POSITION: absolute; TOP: 8px; HEIGHT: 47px" type="button" value='click的时候,我要把"1234"放在h1.html中最后获得焦点txtbox中'>
</form>
</body>

<script language="vbscript">

Option Explicit

dim oPW      '父窗口
'''''''''''''''''''''''''''''''''''''''''''
Sub window_onload()
Set oPW = window.dialogArguments
End Sub
'''''''''''''''''''''''''''''''''''''''''''
Sub b1_onclick
   'msgbox "这里要怎么写呢?"
   'opw.document.all.t1.value="1234"
End Sub
</script>
<script>
function myset()
{
opw.document.all[opw.myfocustext].value="1234";
}
</script>
</html>