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 have created HTML INPUT element with type="RANGE" and with id="slider". Why cannot I access its value using getAttribute("value") method? Debugger shows that there is an attribute named "value" with some value which...
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...
Hope somebody can help with this:  My Demo   How can I get element's child with exact tag name (in this case img)? How can I get this child's attribute?   Next doesn't work:  var banner = document.getElementById('banner'); var img...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.