开发者

Dynamic Expand and Shrink of a div border with "SELECT" dropdown list

How can I achieve the border Expand/Shrink effect along with border when "SELECT&quo开发者_如何学编程t; type drop-down is clicked.


Something like this:

<div id="borderfx">&nbsp;</div>

<script type="text/javascript">
    function changeBorder() {
       document.getElementById('borderfx').style.borderStyle = this.options[this.selectedIndex].value;
    }
</script>

<select onchange="changeBorder()">
   <option value="solid">Solid</option>
   <option value="dashed">Dashed</option>
   <option value="dotted">Dotted</option>
</select>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜