vbs引用另一个vbs的代码
时间:2021-04-14 09:04:08|栏目:VBS|点击: 次
第一个页面:
<html>
<head>
<script language="VBScript">
Sub Hello()
Document.All.myScriptlet.Hello
End Sub
</script>
</head>
<body onload="Hello()">
<OBJECT ID="myScriptlet"
TYPE="text/x-scriptlet"
DATA="2.htm"
HEIGHT="0" WIDTH="0">
</OBJECT>
</body>
</html>
2.htm里的源码:
<script language="VBScript">
Sub public_Hello()
MsgBox "Hello World!"
End Sub
</script>
<html>
<head>
<script language="VBScript">
Sub Hello()
Document.All.myScriptlet.Hello
End Sub
</script>
</head>
<body onload="Hello()">
<OBJECT ID="myScriptlet"
TYPE="text/x-scriptlet"
DATA="2.htm"
HEIGHT="0" WIDTH="0">
</OBJECT>
</body>
</html>
2.htm里的源码:
<script language="VBScript">
Sub public_Hello()
MsgBox "Hello World!"
End Sub
</script>