JavaScript Formatted Input

Bind to the radixChange event by type: jqxFormattedInput. Author: http://jqwidgets.com

by jqwidgets

HTML

<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<div id="jqxFormattedInput">
    <input type="text" />
    <div></div>
</div>
<div id="log" style="margin-top: 150px;"></div>

JavaScript

$("#jqxFormattedInput").jqxFormattedInput({
    theme: "energyblue",
    width: 200,
    height: 25,
    radix: "binary",
    value: "11111101",
    spinButtons: false,
    dropDown: true
});

$("#jqxFormattedInput").on("radixChange", function (event) {
    // event arguments
    var args = event.args;
    // new radix
    var radix = args.radix;
    // old radix
    var oldRadix = args.oldRadix;
    $("#log").append("The radixChange event has been triggered.<br />New radix: " + radix + "; old radix: " + oldRadix + "<br />");
});