@todojs/

multiselect

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • components
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>test 01</title>
  <script src="https://unpkg.com/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
  <script src="components/todojs-multiselect-polyfill.js"></script>
</head>
<body>
<pre id="result"></pre>
<todojs-multiselect>
  <option value="1">uno</option>
  <option value="2">dos</option>
  <option value="3">tres</option>
  <option value="4">cuatro</option>
</todojs-multiselect>
<script> 
document.querySelector ('todojs-multiselect').addEventListener ('change', (evt) => { 
  result.innerHTML = evt.target.value.toString (); 
});
</script>
</body>
</html>
result
console