×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: unki down
Added: Jun 24, 2015 9:46 AM
Modified: Jun 24, 2015 10:21 AM
Views: 15
Tags: no tags
  1. function $(target){
  2.     "use strict";
  3.     var selectedTarget = document.querySelector(target);
  4.     return selectedTarget;
  5. }
  6. function $$(target) {
  7.     "use strict";
  8.     var selectedTarget = document.querySelectorAll(target);
  9.     return selectedTarget;
  10. }
  11.  
  12. // anwendungs bsp.
  13. var meinarray = $$('p');
  14. for (i = 0; i < meinarray.length; i++) {
  15.         meinarray[i].innerHTML = "checkd!";
  16. }

1 comment

var userdump 2 years ago
Hallo

Write a comment