Hello!
I have a div and input block. When the user enters a value into input , this value is transferred to the div . How can I do that when a user enters, for example, a degree ( 2^3 ), then it was displayed in a div'е like this: 2³ ?
Code:
$(function() { $('#number').on('keyup', function() { $('#value').html($(this).val()); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <p> <input type="text" id="number"> </p> <p>Уравнение:</p> <div id="value"></div>
$('#value').html(process($(this).val()));where process is your conversion - vp_arthprocess? - user238662string => string, in which you parse the field value, and build what you want to see. - vp_arth