hacks5_3.js
来自「OReilly.Ajax.Hacks.Tips.and.Tools.for.Cr」· JavaScript 代码 · 共 20 行
JS
20 行
window.onload=function(){ JsBikeBean.getBikeInfo(populate);};function populate(map){ DWRUtil.removeAllOptions("bikes"); addOptionValues("bikes", map);}function addOptionValues(_id,_map){ //handle the return value as a JS object // var jMap = new Function("return "+_map)(); var sel = document.getElementById(_id); var opt = null; if(sel != null){ for(var prop in _map) { opt=document.createElement("option"); opt.setAttribute("value",_map[prop]); opt.appendChild(document.createTextNode(prop)); sel.appendChild(opt); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?