但在编写输入\sqrt[3]{64}=4
时,根未按预期呈现。如何在输入时获得上图中的结果?
这是我的代码:
var mathFieldSpan = document.getElementById('math-field');
var MQ = MathQuill.getInterface(2); // for backcompat
var mathField = MQ.MathField(mathFieldSpan, {
spaceBehavesLikeTab: true, // configurable
});
#math-field{
position:absolute;
width:65%;
left:40px;
height:40px;
border-radius:5px;
box-shadow:none;
outline:none;
font-family:Lato,sans-serif;color:#767676;font-weight:400;
border:2px solid #20BF9F;
font-size:15px;
transition:all 0.5s ease-out;
}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://mathquill.com/lib/mathquill.css">
<script type="text/javascript" src="http://mathquill.com/lib/mathquill.js"></script>
<span id="math-field" ></span>
答案 0 :(得分:2)
输入时可以实现此目的:\nthroot3{64}=4
请注意,mathfield的乳胶转换为:\sqrt[3]{64}=4
。