Search notes:
HTMLElement: inert
If an
HTMLElement's inert
attribute is set to
true
, the
browser ignores user input for that element.
In the following example, the text This text becomes inert is not selectable:
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>inert</title>
</head>
<style>
* { font-family: sans-serif }
</style>
<script>
function main() {
document.getElementById('two').inert = true;
}
</script>
<body onload='main()'>
<div id='one' >This is «normal» text.</div>
<div id='two' >This text becomes <i>inert</i>.</div>
<div id='three'>This is normal text, again.</div>
</body>
</html>