taymath/templates/differentiation.html

33 lines
1.0 KiB
HTML

{% extends "layout.html" %}
{% block title %}
Differentiation
{% endblock %}
{% block main %}
<div class="col-sm-12" style="background-color: #0f11175c; padding: 20px; border-radius: 8px">
<font color="white" size="5">
<p>Function you would like to Derive: </p>
<form action="/differentiation" method="post">
<div class = "form-group">
<input autocomplete="off" autofocus class="form-control" name="function" placeholder="Function" type="text" id="function">
</div>
<p id="jp">Your Input Will Appear Here</p>
<button class="btn btn-warning" type="submit">Differentiate</button>
</form>
</font>
</div>
<script>
let value = $("#function").val();
$(document).ready(function(){
$('#function').on('input', function() {
let testvalue = $('#function').val();
$('#jp').html("$f(x) = "+testvalue+"$");
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
});
})
</script>
{% endblock %}