Just a CodeMonkey!
你可以throw new exception('消息','错误号')
然后CJSON::encode($e->getCode())
最后在页面ajax请求即可
纳尼?来围观了。支持一下。