<input id="checked" type="checkbox">
|
let button: Button = new Button();
button.appendTo('#btn');
let checkBoxObj: CheckBox = new CheckBox({ label: 'CheckBox', checked: true });
checkBoxObj.appendTo('#checked');
document.getElementById("btn").addEventListener('click', function () {
let instance: CheckBox = getComponent(document.getElementById("checked"), "checkbox");
instance.checked = instance.checked === true ? false: true;
});
|
<input id="checked" type="checkbox"> |
button = new ej.buttons.Button({});
button.appendTo("#btn");
var checkBoxObj = new ej.buttons.CheckBox({ label: "CheckBox", checked: true });
checkBoxObj.appendTo("#checked");
document.getElementById("btn").addEventListener("click", function () {
var instance = ej.base.getComponent(
document.getElementById("checked"),
"checkbox"
);
instance.checked = instance.checked === true ? false : true;
}); |
<style>
.e-checkbox-wrapper .e-label {
font-size: 25px;
}
</style> |