前台调用后台方法,输出结果,输出地是object Object,怎样转换成string类型呢。
function GetCount() 
        {
            var str = Original.Plateform.Tianda.Page.PEECM.PEECM0001.GetNewsStatusCount();
            alert(str);
        }
        setInterval("GetCount()",5000);

解决方案 »

  1.   

    Microsoft JScript 运行时错误: 对象不支持此属性或方法
      

  2.   

    Microsoft JScript 运行时错误: 对象不支持此属性或方法
      

  3.   

    Original.Plateform.Tianda.Page.PEECM.PEECM0001.GetNewsStatusCount() 这个方法你有返回的是个什么类型的 在后台就改下  你在JS 里面 toString 要不得滴
      

  4.   

    后台开始时int型的现在改成string型输出地还是object Object 这样的
      

  5.   


     [AjaxPro.AjaxMethod]
            public  string  GetNewsStatusCount()
            {
                string UserID = Session["hidUserID"].ToString();
                int SemesterID = Convert.ToInt32(Session["hidSemesterID"].ToString());
                string count = BLLPEE100101.GetCount(UserID,SemesterID , "0").ToString();
                return count;
            }
    这是后台代码
      

  6.   

    ASP.NET高级编程要不要?也是从基础讲起,控件使用之类的,后面就慢慢复杂以前在www.verycd.com下载的,现在很多电子书都下载不到了!下载页面:ASP.NET揭秘
    下载页面:ASP.NET高级编程
      

  7.   

    Original.Plateform.Tianda.Page.PEECM.PEECM0001.GetNewsStatusCount().value
      

  8.   

    你应该看看
    Original.Plateform.Tianda.Page.PEECM.PEECM0001.GetNewsStatusCount()
    这个函数返回的是什么。
      

  9.   

    看一下吧,或许对你有帮助
    http://blog.sina.com.cn/s/blog_4f8ebcd50100d8s1.html