回答

2

它將添加下拉後的DOM準備

<html> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 
<script> 
    $(document).ready(function(){ 
    $("#dropdown").append("<option>Option 1</option><option>Option 2</option>"); 

    }) 
</script> 
<body> 
    <select id="dropdown"></select> 
</body> 

相關問題