Search
 
SCRIPT & CODE EXAMPLE
 

HTML

dom button

<button name="favorite">
  <svg aria-hidden="true" viewBox="0 0 10 10"><path d="M7 9L5 8 3 9V6L1 4h3l1-3 1 3h3L7 6z"/></svg>
  Add to favorites
</button>
Comment

button DOM

const btn = document.querySelector("button");
const txt = document.querySelector("p");

btn.addEventListener("click", updateBtn);

function updateBtn() {
  if (btn.textContent === "Start machine") {
    btn.textContent = "Stop machine";
    txt.textContent = "The machine has started!";
  } else {
    btn.textContent = "Start machine";
    txt.textContent = "The machine is stopped.";
  }
}
Comment

PREVIOUS NEXT
Code Example
Html :: design to html 
Html :: jquery download text in html element new line 
Html :: mettre des écritaux sur le coté html 
Html :: what is indentation in web development 
Html :: html comment line 
Html :: fix stuff 
Html :: loader bootstrap 4 
Html :: a pint of sap from a 4000 year old bristlecone pine 
Html :: iframe html pdf download 
Html :: localhost server html how to set up 
Html :: nepal location 
Html :: cara meretas website 
Html :: nuxt for add attribute select 
Html :: calculate spread percentage 
Html :: empty pre-selected option html 
Html :: html vase 
Html :: visa card 
Html :: write code faster in vscode 
Html :: how to send boolean with newselectList from cshtml in form C# 
Html :: jQuery Unobtrusive Ajax Helpers 
Html :: bootstrap 4 vertical tabs responsive 
Html :: vim terminal to add data in each line with file open 
Html :: image code 
Html :: html project ideas 
Html :: html file paths 
Html :: fontawesome 4.7 cdn 
Css :: css center div in page 
Css :: css transition visibility 
Css :: absolute vertical position css 
Css :: AppDataRoaming pm eact-native.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =