skip to Main Content

Javascript – How to get the attribute of an innerHTML?

I'm trying to get the value of a span attribute (data-red) inside a table cell. <td class=" u-tL" headers="due-date" aria-labelledby="due-date"><span data-red="255" style="display: block; width: 75px;">19-JAN-2024</span></td> I've tried the code below but it's giving me the error "Uncaught TypeError: spn.getAttribute is…

VIEW QUESTION

ASP.NET [PageRemote] did't work with class. Why?

This is ASP.NET Razor Pages Project with ASP.NET Identity Registration Page (.NET 8). Email checking (PageRemote) works fine, but only if the Email property is not a member of the Input class (automatically generated by ASP.NET Identity) [BindProperty] [Required] [EmailAddress]…

VIEW QUESTION

Html – Attributes to array

What would be the best way to get the IMG SRC to an array such as: var images = [ 'img1.png', 'img2.png', img3.png' ]; <div class="cc"> <img class='content-image' src="./img1.png" alt=""> <img class='content-image' src="./img2.png" alt=""> <img class='content-image' src="./img3.png" alt=""> <img class='content-image'…

VIEW QUESTION
Back To Top
Search