Javascript toSource() method not working

前端 未结 5 1774
臣服心动
臣服心动 2020-12-05 18:58

I\'m getting a \"Object doesn\'t support this property or method error\", does anyone know why?

I do have values plugged into userId, fname, lname, oname, sam, hasAc

5条回答
  •  甜味超标
    2020-12-05 19:38

    Try using a JSON serializer instead. toSource is Mozilla specific and not supported by IE.

    If you are just debugging then your best bet is going to be to install Firebug and use console.dir(emp); to print the contents of an object to the console window.

    Update: Just notice that on the link you posted it says, "Note: This method does not work in Internet Explorer!" And on the MDC page it says "Non-Standard".

提交回复
热议问题