1. jsp labels can be used in jsp page js
Var patientInfoList = {patientId: "$ {session. patientId }"};
VarDocDepList = [], NoTypeMap = ["", "General", "attending doctor", "Deputy Chief Physician", "Chief Physician"];
<C: forEach varStatus ="Idx"Var =" list "items =" $ {docDepList} ">
DocDepList[$ {Idx. index}] = {DoctorId: "commandid list.doc torId}", departmentName: "$ {list. departmentName }"};
</C: forEach>
DocDepListIs an array, and the js value assignment can be an object.
PatientInfoListIs an object
2. If the value passed by ajax is
Copy codeThe Code is as follows:
{"Birthday": "1977-07-08", "contactInfoList": [], "gender": "male"} can use eval ("(" + data + ")"). returns the value of birthday.
[{"ContactInfo_ID": 0, "create_Time": "" create_Time}] is equivalent to an array. You can use eval ("(" + data + ")") [0]. get create_Time
[{"ContactInfo_ID": 0, "create_Time": "" create_Time}, {"contactInfo_ID": 0, "create_Time": "" create_Time}], {"contactInfo_ID ": 0, "create_Time": "" create_Time}, {"contactInfo_ID": 0, "create_Time": "" create_Time}]
Var dataArr = eval ("(" + data + ")");
For (var I = 0; I <dataArr. length; I ++ ){
Alert (dataArr [I]. create_Time );
}