skip to Main Content

Javascript – opening the window depending on the variable

<html> <body> <button onclick="previous()">previous</button> <button onclick="next()">next</button> <img src="https://th.bing.com/th/id/OIP.-d3JKGX5ZJ3Y3U7ybY8h8gHaE7?rs=1&pid=ImgDetMain" onclick="reDirect()"></img> <script> maxnum=4 num=0 function previous(){ if(num>0) { num++ } else{} } function next(){ if(num<maxnum){ num++ } else{} } function reDirect(){ if(num=0) { window.open("https://youtube.com"); } else{} } </script> </body> </html> I wanted…

VIEW QUESTION

Html – How do I get the value of the aria-label attribute from this WebElement?

Using Java Selenium, I have a reference to a WebElement object that represents the following HTML node: <td role="gridcell" class="mat-calendar-body-cell ng-star-inserted" style="width: 25%; padding-top: 7.14286%; padding-bottom: 7.14286%;" tabindex="-1" data-mat-row="0" data-mat-col="0" aria-label="2001" aria-selected="false">...</td> I need the 2001 value of the aria-label…

VIEW QUESTION

Html – How to toggle existing class with JavaScript

I have a navbar with Bootstrap icon inside the anchor tags Here's my code: <li class="nav-item"> <a href="#" class="nav-link"> <i class="bi bi-house"></i> </a> </li> <li class="nav-item"> <a href="#" class="nav-link"> <i class="bi bi-heart"></i> </a> </li> <li class="nav-item"> <a href="#" class="nav-link"> <i…

VIEW QUESTION
Back To Top
Search