这个下拉菜单然后改变成超链接的形式?

来源:百度知道 编辑:UC知道 时间:2024/06/22 04:53:47
<select onchange="if(this.options[this.selectedIndex].value != '') {
var thisurl = document.URL.replace(/[&?]styleid=.+?&sid=.+?$/i, '');
top.location=(thisurl.replace(/\#.+$/, '')+(thisurl.match(/\?/) ? '&' : '?')+'styleid='+this.options[this.selectedIndex].value+'&sid=QlRJve') }">
<option value="">界面风格</option>
<option value="">----------</option>
<option value="1">默认风格</option>
</select>

这个是 Discuz! 5.5.0论坛的界面风格改变菜单
我想让他不是以下拉菜单的形式表现出来
而是以超链接的形式表现出来
怎么改?
当然是越简单越好咯~

<a href="#" onclick="var thisurl = document.URL.replace(/[&?]styleid=.+?&sid=.+?$/i, '');
top.location=(thisurl.replace(/\#.+$/, '')+(thisurl.match(/\?/) ? '&' : '?')+'styleid=1&sid=QlRJve') ">默认风格</a>

styleid=1就是option的value值
styleid=2
styleid=2等