for
(
var
i=0; i<data.length; i++){
tr =
'<tr>'
;
tr +=
'<td>'
+ data.status == 0 ?
"正常"
:
"报警"
+
'<td>'
;
tr +=
'</tr>'
;
$(
"#table1"
).find(
"tbody"
).append(tr);
$(
"#table1 tbody"
).find(
"tr"
).click(
function
(){
for
(
var
i=0; i<data.length; i++){
tr =
'<tr onclick="OnTrClick()">'
;
tr +=
'<td>'
+ data.status == 0 ?
"正常"
:
"报警"
+
'<td>'
;
tr +=
'</tr>'
;
$(
"#table1"
).find(
"tbody"
).append(tr);
$(
"#table1 tbody"
).find(
"tr"
).live(
"click"
,
function
(){
$(
"#table1 tbody"
).find(
"tr"
).on(
"click"
,
function
(){