default.asp:
=======================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<%
response.write "<script language=javascript src=""script/test.js""></script>" + vbcrlf
%>
</HEAD>
<BODY>
<%
response.write "<script>" + vbcrlf
response.write "var o = new obj();" + vbcrlf
response.write "document.write(o.test.name);" + vbcrlf
response.write "</script>" + vbcrlf
%>
</BODY>
</HTML>
===============================
test.js
===============================
function test(recall)
{
this.recall = recall;
this.name = "";
this.value = "";

this.Initialize = function(name, value)
{
this.name = name;
this.value = value;
}
}function obj()
{
this.name = "this is manager!"
this.test = new test(this);
this.test.Initialize("123456", "This is a test only!");
}
================================问题:
为什么在asp生成的页面中没有任何信息??急急急急急,在线等

解决方案 »

  1.   

    <head>
    <SCRIPT LANGUAGE=javascript src="test.js"></script>
    </head>
      

  2.   

    function test(recall)
    {
    this.recall = recall;
    this.name = "";
    this.value = "";

    this.Initialize = function(name, value)
    {
    name = name;
    value = value;
    }
    }
    把函数test.js修改成这样,应该就可以了
      

  3.   

    服务器端不能解释客户端的脚本,ASP中的脚本是IIS来解释,JS的脚本是 IE 的解释器来解释,所以当前这种情况不能相互调用,不过你可以用其他方法来解决,比如查询字符串传递值等等
      

  4.   

    可是我直接拿到客户端当前目录打开一个html文件也无法在窗口中显示任何东东??
      

  5.   

    document.write改成alert看看是什么东西~