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>";
解决方案 »
- XMLHttpRequest 非常菜鸟级问题
- 好用的web打印控件都有哪些?
- 关于<input type="file">的问题???
- 怎样使用js在table里添加tr和td
- Eclipse开发Web的第一个牛刀小试
- js 中 innerHTML的使用
- 怎么样检查我输入TEXT框里的内容是不是有效的手机号码,最好提供代码
- scrolltop,clientwidth等几个坐标具体对应什么区域
- 怎样用Javascript控制Form上的控件的可用性
- 时间控件My97DatePicker怎么调整高度?并且让显示区域自适应?
- 如何在一个HTML控件上显示一个HTML
- javascript怎么实现这样的功能,多选框互移
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>奇怪第一种写法可以,第二种动态的传参数就不行了