velocity 的js里面循环对象使用#foreach
来源:互联网 发布:人工智能雄帝科技 编辑:程序博客网 时间:2024/06/06 17:54
<script>
function changeSuggestionType(typeid){
var html="";
#foreach($types in ${myAccountDTO.suggestionIdeaCommand.types})
if(typeid==${types.suggestionType.suggestionTypeId}){
if('${types.typeSubDTOList}'=='[]'){
html+='<select style="width:200px"><option value="0">#springMessage("vm.myaccount.ideadeselect")</option></select>';
}else{
var index=false;
#foreach($typesubDTO in ${types.typeSubDTOList})
if(index)
html+='<select style="width:200px;margin-left:100px;" name="suggestionIdeaCommand.suggestionIdeaDTO.suggestionTypeSubId">';
else
html+='<select style="width:200px" name="suggestionIdeaCommand.suggestionIdeaDTO.suggestionTypeSubId">';
html+='<option value="0">#springMessage("vm.myaccount.ideadeselect")</option>';
#foreach($typesub in ${typesubDTO.suggestionTypeSubList})
html+='<option value="${typesub.suggestionTypeSubId}">${typesub.name}</option>';
#end
html+='</select><br><br>';
index=true;
#end
}
}
#end
document.getElementById("showtypesub").innerHTML = html;
}
</script>
function changeSuggestionType(typeid){
var html="";
#foreach($types in ${myAccountDTO.suggestionIdeaCommand.types})
if(typeid==${types.suggestionType.suggestionTypeId}){
if('${types.typeSubDTOList}'=='[]'){
html+='<select style="width:200px"><option value="0">#springMessage("vm.myaccount.ideadeselect")</option></select>';
}else{
var index=false;
#foreach($typesubDTO in ${types.typeSubDTOList})
if(index)
html+='<select style="width:200px;margin-left:100px;" name="suggestionIdeaCommand.suggestionIdeaDTO.suggestionTypeSubId">';
else
html+='<select style="width:200px" name="suggestionIdeaCommand.suggestionIdeaDTO.suggestionTypeSubId">';
html+='<option value="0">#springMessage("vm.myaccount.ideadeselect")</option>';
#foreach($typesub in ${typesubDTO.suggestionTypeSubList})
html+='<option value="${typesub.suggestionTypeSubId}">${typesub.name}</option>';
#end
html+='</select><br><br>';
index=true;
#end
}
}
#end
document.getElementById("showtypesub").innerHTML = html;
}
</script>
0 0
- velocity 的js里面循环对象使用#foreach
- 18、C#里面的数组和foreach循环的使用
- ForEach循环的使用
- Velocity.js的使用
- Velocity.js的使用
- Velocity.js的使用
- 对于foreach循环的使用
- Foreach循环语句的使用
- js里面的循环结构
- 使用velocity生成静态页面,及velocity的循环控制
- js foreach循环
- JS forEach 中断循环
- js跳出forEach循环
- 【Java】Java中foreach循环的使用
- 使用foreach循环要注意的
- 初学java--foreach循环语句的使用
- js里面的object对象
- js里面的object对象
- poj 1469 COURSES 【二分匹配】
- C面试题(判断大端小端)
- Mysql不能插入中文(彻底解决)
- 八皇后问题
- 分数化小数
- velocity 的js里面循环对象使用#foreach
- 实例讲解虚拟机3种网络模式(桥接、nat、Host-only)
- 一个字符引发的思考
- 自建企业邮箱如何选择服务器
- MSSQL语句的性能调试(一)使用OR还是Exists
- 浅谈C++中指针和引用的区别
- 灰度变换——反转,对数变换,伽马变换,灰度拉伸,灰度切割,位图切割
- Leetcode: Binary Tree Level Order Traversal II
- 服务器端(NodeJS)使用jQuery选择器操作DOM(HTML/XML)