I'm reading through elements on the page (of all kinds) with JavaScript and modifying them if needed. When I do modify one of the elements, I want to leave a marker behind to say that I modified it. Then later, I can read through the elements on...
I have a javascript function that tries to determine whether a div is visible and does various processes with that variable. I am successfully able to swap an elements visibility by changing it's display between none and block; but I cannot store...
I have this input line which I am trying to extract the text of the value attribute:  <input type="text" class="card-input small-font" ng-value="paymentVia.typeDisplay" readonly="" value="Credit card">...
I am really new to JavaScript, but here's what I am starting with:  var anchors = document.body.getElementsByTagName("a"); for(var i=0; i < anchors.length; i++) {   var anc = anchors[i];   if (anc.getAttribute("href") == "/...
I've searched quite a bit on both google and stackoverflow, but a lack of knowledge on how to ask the question (or even if I'm asking the right question at all) is making it hard to find pertinent information.  I have a simple block of code t...
I'm trying to create a class in JavaScript to validate a form. That'll check the form elements and validate a field if it has a specific attribute.  However, the call to getAttribute isn't returning a value. It doesn't get the value i...
I've been looking around much today and spend a few hours trying to get something done. For a client I am creating a slideshow with a lightbox when clicked on an image. The slideshow and lightbox both work, but I don't get the right image in...
I have this code:  var object1 = getElementByID('obj1'); alert(object1.getAttribute('href'));   This displays correctly the URL in the href attribute of the object. But, when I try:  var object1 = getElementByID('obj1'); objec...
I always get [Object object] or are creating a conflict no matter how hard I try. (I tried a couple of other variants.) ;(    var $ = function(selector){    var x;    var obj = {        myLib(selector){       return x || document.querySelectorAll(sel...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.