spirit posteets tagged js  [ Profile ]

Sort by: Date / Title /

  1. 9 years ago
    1. function clearDefault(el) {
    2.   if (el.defaultValue==el.value) el.value = ""
    3. }
    4.  
    5. // Then call this function using the 'onfocus' value of your input box:
    6.  
    7. <input value="Your Comment" onfocus="clearDefault(this)" type="text">
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1862"></script>
  2. 10 years ago
    Aucune erreur DOM n'est générée avec cette méthode
    1. // styleFloat, IE
    2. // cssFloat , Safari ou Firefox
    3. // styleFloat and cssFloat,  Opera
    4.  
    5. //assignation 
    6. var el = document.getElementById('element_id');
    7. el.style.styleFloat = 'left';
    8. el.style.cssFloat = 'left';
    9. //récupération
    10. var elFloat = (typeof el.style.cssFloat === 'string') ? el.style.cssFloat : el.style.styleFloat;
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1420"></script>

First / Previous / Next / Last / Page 1 of 1 (2 posteets)