zoukankan      html  css  js  c++  java
  • 字符串转json格式

    string str = "{\"wang\":\"wang\",\"tiang\":\"tttt\"}

    XmlHttpHelper.transmit(true, "post", "text", "WebForm1.aspx", call, null);

    function call(respones) {
         var p = eval("(" + respones + ")");
         alert(p.wang);
    }

    eval 转换字符串的时候要把取的字符串处理一下 : 即加'('  ')'

  • 相关阅读:
    POJ 1451
    LightOJ 1224
    POJ 2001
    HDU 2072
    POJ 3764
    CH 1602
    CH 1601
    Gym 101873K
    CH 1201
    Gym 101873C
  • 原文地址:https://www.cnblogs.com/xinlang/p/1689784.html
Copyright © 2011-2022 走看看