google+javascriptbanktwitter@js_bankfacebook@jsbankrss@jsbank






Efficace et utile JavaScript/jQuery Trucs et astuces Cette libre de HTML JavaScript tutorial fournit 45 + JavaScript/jQuery conseils et astuces qui vous aideront


Étiquette: d'

Gratuit iPage hébergement Web pour la première année MOMENT



Si vous êtes toujours à la recherche d'un fournisseur d'hébergement Web fiable avec des tarifs abordables, pourquoi vous ne prenez pas un peu de temps pour essayer iPage, seulement avec $1.89/month, inclus $500+ Crédits supplémentaires gratuites pour le paiement de 24 mois ($45)?

Plus de 1.000.000 de clients + existisng peuvent pas avoir tort, vraiment vous n'êtes pas aussi! Plus important encore, lorsque vous enregistrez l'hébergement web à iPage grâce à notre lien, nous allons être heureux de renvoyer un plein remboursement. C'est génial! Vous devriez essayer iPage hébergement web GRATUITEMENT maintenant! Et contactez-nous pour tout ce que vous devez savoir sur iPage.
Essayez iPage GRATUIT première année MOMENT
  • Select all elements except the ones with a given class
  • 1.$('* :not(.someclass)')
  • Add a row to a table
  • 1.$('#myTable tr:last').after('<tr>...</tr>');
  • How to convert decimal to hexadecimal?
  • 1.num = num.toString(16);
    2.reverse process:
    3.num = parseInt(num, 16);
  • Filtering By More Than One Attribute in JQuery
  • 1.var elements = $('#someid input[type=sometype][value=somevalue]').get();
  • How to expire a cookie in x minutes
  • 1.var date = new Date();
    2.date.setTime(date.getTime() + (x * 60 * 1000));
    3.$.cookie('example', 'foo', { expires: date });
  • Selecting the first x items with jQuery
  • 1.example: first 10 anchors
    2.$('a').slice(0,10);
    3.//or
    4.$('a:lt(10)');
  • Working with a select element
  • 1.//Get the value of a selected option
    2.$('selectElement').val();
    3. 
    4.//Get the text of a selected option
    5.$('#selectElementId :selected').text();
    6. 
    7.//Remove an option (e.g. id=1)
    8.$("#selectElementId option[value='1']").remove();
  • How to get client ip address with jQuery
  • 1.$.getJSON("http://jsonip.appspot.com?callback=?",function(data){
    2.    alert( "Your ip: " + data.ip);
    3.});
  • How to parse XML with jQuery
  • file.xml:

    01.<?xml version="1.0" ?>
    02.<result>
    03.    <item>
    04.        <id>1</id>
    05.        <title>title1</title>
    06.        <description>desc1</description>
    07.    </item>
    08.    <item>
    09.        <id>2</id>
    10.        <title>title2</title>
    11.        <description>desc2</description>
    12.    </item>
    13.    <!-- ... -->
    14.</result>
    01.$.get('file.xml',{},function(data){
    02.    $('item',data).each(function(){
    03.        var $this       = $(this);
    04.        var id             = $this.find('id').text();
    05.        var title         = $this.find('title').text();
    06.        var description = $this.find('description').text();
    07.        //do something ...
    08.    });
    09.});
  • How to get the number in the ids
  • 1.<div id="sites">
    2.    <a id="site_1" href="http://siteA.com">siteA</a>
    3.    <a id="site_2" href="http://siteB.com">siteB</a>
    4.    <a id="site_3" href="http://siteB.com">siteC</a>
    5.    ...
    6.</div>

    you need to get 1 from site_1, 2 from site_2 ...

    1.$("#sites a").click(function(){
    2.    var $this     = $(this);
    3.    var nmb     = $this.attr('id').match(/site_(\d+)/)[1];
    4.    ...
    5.});
    iPhoneKer.com
    Save up to 630$ when buy new iPhone 15

    GateIO.gomymobi.com
    Free Airdrops to Claim, Share Up to $150,000 per Project

    https://tooly.win
    Open tool hub for free to use by any one for every one with hundreds of tools

    chatGPTaz.com, chatGPT4.win, chatGPT2.fun, re-chatGPT.com
    Talk to ChatGPT by your mother language

    Dall-E-OpenAI.com
    Generate creative images automatically with AI

    AIVideo-App.com
    Render creative video automatically with AI

    JavaScript par jour


    Google Safe Browsing McAfee SiteAdvisor Norton SafeWeb Dr.Web