Using jQuery and JSON to populate forms?

前端 未结 10 1071
忘掉有多难
忘掉有多难 2020-12-04 10:41

I was wondering how is it popssible to populate forms using JSON?

I have a JSON string which I get using php\'s json_encode() And I want to use the JSON

10条回答
  •  失恋的感觉
    2020-12-04 11:24

    For a weird but valid JSON syntax like

        [{'name':,'value':},
        {'name':,'value':},
        {'name':,'value':},
        {'name':,'value':}]
    

    look at this http://jsfiddle.net/saurshaz/z66XF/

    We had this weird syntax being used in our application and we got around by writing the logic as above.

提交回复
热议问题