1

i am getting this error in my chrome console.username availaibility is workig fine. but password strength is not working. i m new in javascript please help me..

<script type="text/javascript">
    $(function()
    {
      $('.user_name').keyup(function()
      {
      var checkname=$(this).val();
     var availname=remove_whitespaces(checkname);
      if(availname!='' && availname.length  >= 5 ){
      $('.check').show();
      $('.check').fadeIn(400).html('</br> </br> <img src="img/ajax-loading.gif"  style="height:20px;width:20px" /> ');

      var String = 'username='+ availname;

      $.ajax({
              type: "POST",
              url: "available.php",
              data: String,
              cache: false,
              success: function(result){
                   var result=remove_whitespaces(result);
                   if(result==''){
                           $('.check').html(' </br> </br> <img src="img/accept.png"  style="height:20px;width:20px" /> This Username Is Avaliable');
                           $(".check").removeClass("red");
                           $('.check').addClass("green");
                           $(".user_name").removeClass("yellow");
                           $(".user_name").addClass("white");
                   }else{
                           $('.check').html('</br> </br><img src="img/error.png"  style="height:20px;width:20px" /> This Username Is Already Taken');
                           $(".check").removeClass("green");
                           $('.check').addClass("red")
                           $(".user_name").removeClass("white");
                           $(".user_name").addClass("yellow");
                   }
              }
          });
       }else{
           $('.check').html('');

       }
      });

    $('.passwd').password_strength(); 

    });

    function remove_whitespaces(str){
         var str=str.replace(/^\s+|\s+$/,'');
         return str;



    }
    </script>

i am getting this error in my chrome console.username availaibility is workig fine. but password strength is not working. i m new in javascript please help me..


Because in C#, the operation is "cheap" -- it's just returning a byte-for-byte copy of the struct or object reference.

In C++, returning the object is expensive -- it requires making a copy of the object itself by calling the copy constructor, which can involve practically anything the user has specified must happen, including (but not limited to) allocating new resources and destroying old ones.

(For example, imagine if the object to be returned was a binary tree. Copying it would be very expensive compared to copying, say, an int.)

C++11 could have used "move semantics" to avoid copying objects, but move semantics were introduced after pop_back was, and they didn't bother changing it.

4

2 に答える 2

0

jqueryスクリプトの後にパスワードjqueryスクリプトを含めると、機能します..

1.Jquery 2.パスワード

于 2013-10-25T04:42:47.727 に答える
0

jQuery プラグインを定義していないか、 という名前の jQuery プラグインを添付していませんpassword_strength()

スクリプトタグを介してインポートするか、スクリプトをロードするか、独自の jQuery プラグインを定義するかを選択します。自分で書いてください。

また、パスワード強度プラグインは jQuery に依存しているため、スクリプトを正しい順序でロードすることも重要です。

于 2013-10-25T04:34:16.460 に答える