---
title: "Jquery json"
author: "TeddyWang"
date: "2011-06-22T07:06:29Z"
tags: []
categories: ["Web前端"]
slug: "jquery-json"
draft: false
lastmod: "2011-06-22T07:06:29Z"
id: 1100400
url: "https://teddywang.iteye.com/blog/1100400"
---

$.ajax({  
type:"post",  
url :"/cgi-bin/post\_cmd",  
data:{cmd:"time"},  
datatype:"json",  
error:function(){  
alert();  
},  
success:function(rst){  
alert(rst);  
var obj=eval('('+rst+')');  
console.innerText=obj.scal;  
}  
});