随笔分类 - HTML 5
摘要:const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript DOM</h1> <form name="order"> <label> Your name <input type="text" name="f
阅读全文
摘要:import './assets/css/style.css'; const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript DOM</h1> <form name="order"> <label> You
阅读全文
摘要:When you doing Modal UI component, one common aria issue you need to deal with is "Refoucs the opener element when Modal closed". To do this, you need
阅读全文
摘要:For example, we have a list of 'li', for each of them we want to attach event listener to it Bad approach: const app = document.getElementById('app');
阅读全文
摘要:const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript DOM</h1> <form> <label> Sign-up Email <input type="email"> </label> <labe
阅读全文
摘要:const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript DOM</h1> <div class="one"> <div class="two"> <button type="button" class=
阅读全文
摘要:button.addEventListener( 'dblclick', () => { console.log('Double-click!'); }, { once: true } ); https://developer.mozilla.org/en-US/docs/Web/API/Event
阅读全文
摘要:When dynamic changes occur to content on a page they are usually visually apparent to users who can see the page but may not be made apparent to users
阅读全文
摘要:Images must have text alternatives that describe the information or function represented by them so they can be read and understood by those using scr
阅读全文
摘要:Labeling inputs, elements, and widgets add context and clarity for assistive technology such as screen readers. Beyond adding accessible labels to ele
阅读全文
摘要:Labeling inputs, elements, and widgets add context and clarity for assistive technology such as screen readers. When there are already one or more oth
阅读全文
摘要:"Legacy" image formats like jpg and png are often 2-3x larger than "next-gen" image formats like webp. In this video, we'll see how to convert our ima
阅读全文
摘要:Sometimes you'd like to measure how two implementations compare in regards to run time. In this lesson you will learn how to quickly do this using Con
阅读全文
摘要:In this lesson we will see how to measure the used JS heap size in chrome. This can be used for various needs from performance debugging to production
阅读全文
摘要:const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript DOM</h1> <ul> <li>1</li> </ul> `; const ul = app.querySelector('ul'); ul.
阅读全文
摘要:const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript DOM</h1> `; const div = document.createElement('div'); const span = docum
阅读全文
摘要:DocumentFragment can create virtual dom tree. It can helps to avoid layout reflow.. problems Code has profermance problem: const data = ['Earth', 'Fir
阅读全文
摘要:import './assets/css/style.css'; const app = document.getElementById('app'); app.innerHTML = '<h1>JavaScript DOM</h1>'; // <html> console.log(document
阅读全文
摘要:There are two types of Loading events: DOMContentLoaded Loaded DOMEContentLoaded: It happens after index.html has been parsed. <!DOCTYPE html> <html>
阅读全文
摘要:Rules Each page should have at least one <h1> Pages should be structured in a hierarchical manner <h1>: being the most important (usually page titles
阅读全文