string empCode = ds.Tables[0].Rows[i]["EMP_CODE"].ToString(); string empName = ds.Tables[0].Rows[i]["EMP_NAME"].ToString(); string gradeCode = ds.Tables[0].Rows[i]["GRADE_CODE"].ToString(); tr = new TableRow(); td = new TableCell(); td.Attributes.Add("onClick", "javascript: " + "if(confirm(empName)==true){self.close();}" + //this Line "else{return;}");我想在評論部分重用 empName 。有沒有辦法重用它?
我可以在 javascript 函數中重用函數中使用的變量嗎?
智慧大石
2022-10-13 19:25:50