You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ymww_backend/public/assets/libs/nice-validator/demo/use-contenteditable.html

28 lines
657 B

1 year ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Contenteditable</title>
<link rel="stylesheet" href="demo.css">
</head>
<body>
<form id="form1" class="form" data-validator-option="{timely:2}">
<div class="form-item">
<div contenteditable id="email" data-rule="required;email"></div>
</div>
<div class="form-item">
<button type="submit">Submit</button>
</div>
</form>
<script src="https://cdn.jsdelivr.net/jquery/1.12.3/jquery.min.js"></script>
<script src="../dist/jquery.validator.js?local=en"></script>
<script>
$('#form1').on('valid.form', function(){
alert('ok')
});
</script>
</body>
</html>