Get started with vex-js CDN
MIT licensed
Vex-js is a library for creating interactive musical scores and compositions.
Tags:- dialog
- modal
- client-side
- javascript
- css
- themes
- alert
- confirm
- prompt
Stable version
Copied!
How to start using vex-js CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with vex-js CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/vex-theme-bootstrap4.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/js/vex.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/js/vex-theme-bootstrap4.min.js"></script>
</head>
<body>
<button id="show-alert">Show Alert</button>
<button id="show-confirm">Show Confirm</button>
<button id="show-prompt">Show Prompt</button>
<script>
document.getElementById('show-alert').addEventListener('click', () => {
vex.dialog.alert('This is an alert message.');
});
document.getElementById('show-confirm').addEventListener('click', () => {
vex.dialog.confirm({
message: 'Are you sure you want to delete this item?',
callback: (value) => {
if (value) {
console.log('Item deleted.');
}
},
});
});
document.getElementById('show-prompt').addEventListener('click', () => {
vex.dialog.prompt('Enter your name:').then((value) => {
console.log(`Hello, ${value}!`);
});
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!