function pageAction() {
//if (!code) return;
var action = [
{code:1, op:'save', url:'<c:url value="/attribute!create" />'},
{code:2, op:'update', url:'<c:url value="/attribute!update" />'},
{code:3, op:'delete', url:'<c:url value="/attribute!destroy" />'},
{code:4, op:'groupManage', url:'<c:url value="/attribute!groupList" />'},
{code:5, op:'goback', url:'<c:url value="/attribute!toCatalog" />'}
];
//var illegal = true;
//var currentAction = null;
//var formId = 'attrForm', formEl = $('#' + formId);
for (var i=0;i<action.length;i++) {
//alert(action[i].code); 直接操作JSON字符串
//alert(action[i].url);
var obj = eval(action[i]); // 变成对象
alert(obj.url);
}
}