json formatted display editor (third-party open source framework FlexiJsonEditor)

 

 

demo download :  http://download.csdn.net/download/knight_black_bob/10037216

 

 



 

 

js part

 

    <pre id="path"></pre>
    <div id="editor" class="json-editor"></div>
    <textarea id="json"></textarea><br/>
 
    <script src="json2.js"></script>
    <script src="jquery.min.js"></script>
    <script src="jquery.jsoneditor.js"></script>
    <script src="jsoneditor.js"></script>

 

 

Initialize data for the first time

function ajaxRequest(){
	$.ajax({
		url: '/json/jsonREquest.do',
	    type: 'POST',
	    success: function (result) {
	    	json = result;
	    	$('#json').val(JSON.stringify(json));
	    	 $('#editor').jsonEditor(json, { change: updateJSON, propertyclick: showPath });
	    }
	})

}

ajaxRequest();

 

 

 

 

 

 

 

 

 

 

 

 

 

Donate to developers 

Driven by interest, I write 免费something with joy and sweat. I hope you like my work and can support it at the same time. Of course, if you have money to support a money field (support Alipay, WeChat, and the buckle group), if you have no money to support a personal field, thank you.

 

Personal homepage : http://knight-black-bob.iteye.com/



 
 
 Thank you for your sponsorship, I will do better!

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326678030&siteId=291194637