html:是一个列表
Ext.get('styleswitcher_select').on('change',function(e,select){
var name = select[select.selectedIndex].value;
setActiveStyleSheet(name);
});
function setActiveStyleSheet(title) {
var i,a,
links = document.getElementsByTagName("link"),
len = links.length;
for (i = 0; i < len; i++) {
a = links[i];
if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if (a.getAttribute("title") == title) a.disabled = false;
}
}
}
posted on 2010-04-01 17:45
紫蝶∏飛揚↗ 阅读(1546)
评论(0) 编辑 收藏