innerHtml可不可以写struts2标签,例如:
cell.innerHTML = "<select name='tepScript'><s:iterator id='item' value='#request.testList'><option><s:property/></option></s:iterator></select>";
cell.innerHTML = "<select name='tepScript'><s:iterator id='item' value='#request.testList'><option><s:property/></option></s:iterator></select>";
struts2标签是服务端代码
function tepSelChange(Obj, selList)
{ alert("11111"+selList);
var tb = Obj.parentElement.parentElement.parentElement;
var index = Obj.parentElement.parentElement.rowIndex;
var selIndex = Obj.options.selectedIndex;
var cell = tb.rows[index].cells[3];
cell.innerHTML = "<select name='tepScript'><s:iterator value='"+selList+"'><option><s:property/></option></s:iterator></select>";
alert("22222"+cell.innerHTML ); }
调用的时候用onclick="tepSelChange(this, '#request.testList')";弹出对话框:
111#request.testList
222"<select name='tepScript'><option>+selList+</option></select>奇怪第一种写法可以,第二种动态的传参数就不行了