日期:2014-05-16  浏览次数:20335 次

jquery 设置dropdownlist选中项以后,怎么触发change()事件啊?
选中dropdownlist,并且触发change()事件

------解决方案--------------------
HTML code

<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="gb2312" />
        <title></title>
        <script src="http://code.jquery.com/jquery-latest.js"></script>
        <style>
        
        </style>
    </head>
    <body>
        <select>
            <option value="1">1-1</option>
            <option value="2">1-2</option>
            <option value="3">1-3</option>
        </select>
        <script>
            $('select').val(2).change(function(){
                alert(123);
            }).change()
        </script>
    </body>
</html>