开发者

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

开发者 https://www.devze.com 2023-03-28 19:31 出处:网络
How can I achieve the border Expand/Shrink effect along with border when "SELECT&quo开发者_如何学编程t; type drop-down is clicked.Something like this:

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

精彩评论

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