2017-05-10 45 views

回答

0

我假設代碼是給選擇選項的值。您可以使用jquery通過每個選項的文本更改每個選項的值。可能工作。

 <script>     
      $(document).ready(function() { 

       $("#selectId > option").each(function() { 
        $(this).val($(this).text()); 
        alert(this.text + ' ' + this.value); 
       });     

      });     
     </script> 
+0

謝謝,但我已經更改爲另一個庫。這個圖書館已被創作者拋棄。 –