0

Im using the following code and its working on all the browsers Except IE 7 this error occurs when the number of options exceeds 1900 options anyone have a solution for it .when I click a value it gives me a javascript error(A script on this page导致 Internet Explorer 运行缓慢)。感谢您的帮助。谢谢。这是我正在使用的代码。

   <html xmlns="http://www.w3.org/1999/xhtml">

   <head>

           <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

           <link href="http://select-box.googlecode.com/svn/tags/0.2/jquery.selectbox.css"type="text/css" rel="stylesheet" />

           <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

           <script type="text/javascript" src="http://select-box.googlecode.com/svn/tags/0.2/jquery.selectbox-0.2.min.js"></script>

         <title>Untitled Document</title>

      </head>



      <body> 

       <SCRIPT Language="JavaScript">

           <!-- 

           document.write('<select id="language">')

           for(i = 0; i < 2500; i++){

           document.write('<option value="javascript">'+i+'</option>') 

             }

            document.write('</select>')

           //-->

           </SCRIPT>

         </body> 

     <script type="text/javascript">

         $(function () {

         $("#language").selectbox();


       });

   </script>



    </html>
4

1 回答 1

0

您是否尝试过输入数字的文本?我看不出滚动超过 2500 个数字的意义...当然,您可以使用两个选择,一个用于前 1250 个选项,另一个用于其他选项

于 2012-12-02T08:19:48.297 回答