0

私はこのサイト構造を持っています:

先頭ページ:

    <script src="../jquery.uniform.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
      $(function(){
        $("input, textarea, select, button").uniform();

        $("#show_image_error").load("adv_dell_img_err.html?id="+ Math.random());
      });
    </script>
    <link rel="stylesheet" href="../css/uniform.default.css" type="text/css" media="screen">
  </head>
  <body>
  In first page:<br/>
    <select>
        <option>Through Google</option>
        <option>Through Twitter</option>
        <option>Other&hellip;</option>
    </select>
    <div id = "show_image_error">load file ...</div>

adv_dell_img_err.htmlファイル:

File 2
//get data from DB ...
<select>
    <option>Through Google</option>
    <option>Through Twitter</option>
    <option>Other&hellip;</option>
</select>

adv_dell_img_err.htmlのユニフォームが機能しないのはなぜですか?それらをどのように修正しますか?

ありがとう

4

1 に答える 1

1

これを変更してみてください:

$(function(){
        $("input, textarea, select, button").uniform();

        $("#show_image_error").load("adv_dell_img_err.html?id="+ Math.random());
      });

これに:

     $(function(){
        $("#show_image_error").load(
             "adv_dell_img_err.html?id="+ Math.random(), 
             function(responseText, textStatus, XMLHttpRequest) {
                 $("input, textarea, select, button").uniform();
             }
         );
      });

問題は、uniform の実行時にコンテンツがまだロードされていないことだと思います。

于 2010-10-08T05:35:30.867 に答える