2017-02-04 3 views
-3

入力テキストボックスに平方根を表示する方法です。例えば、文字列80(√2345)68を平方根に2345で上書きして表示したい場合(中括弧は無視する)。助けてください !!入力テキストに平方根を表示しますか?

+0

は、私はあなたが入力フィールドに完全な平方根のドローを持つことができないと思います。 – mrlew

答えて

0

google charts infographicを使用できます。例えば

<img src="https://chart.googleapis.com/chart?cht=tx&chl=\sqrt(1234)%2Ba^2"> 

は、私はあなたが数学関連のテキスト/数式をレンダリングするためにエンジンを使用する必要があるだろうと思いアップ

0

enter image description hereとして表示されるでしょう。人気のあるものはMathJaxです。Documentationを確認してください。

+0

ありがとう!試してみます。 – Rishab

0

MathJax拡張は:QUESに求められる以下sample

を有するmathjax-ext-contrib forminputサンプル上のコードである

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
<title>Add \Input to MathJax</title> 
 
<script type="text/x-mathjax-config"> 
 
MathJax.Hub.Config({ 
 
    extensions: ["http://cs.jsu.edu/mathjax-ext/github/forminput/forminput.js"], 
 
    styles: { 
 
    ".MathJax_Input": { "margin": "0 2px" }, 
 
    ".red_background": { "background-color": "#F88" } 
 
    } 
 
}); 
 
</script> 
 

 
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> 
 

 
</head> 
 
<body> 
 

 
<p> 
 
Here is an equation with form elements: 
 
\(\FormInput{a}x+\FormInput[][red_background]{b}\). 
 
</p> 
 

 
<p> 
 
Here is another: 
 
\[ 
 
\int_{\FormInput[][][2]{lowlim}}^{\FormInput{highlim}} x^3\,dx = 
 
\left.\frac{x^{\FormInput[2]{n}}}{\FormInput{m}}\right]_2^7 
 
\] 
 
</p> 
 

 
</body> 
 
</html>

編集

マッチング発現ン

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
<title>Add \Input to MathJax</title> 
 
<script type="text/x-mathjax-config"> 
 
MathJax.Hub.Config({ 
 
    extensions: ["http://cs.jsu.edu/mathjax-ext/github/forminput/forminput.js"], 
 
    styles: { 
 
    ".MathJax_Input": { "margin": "0 2px" }, 
 
    ".red_background": { "background-color": "#F88" } 
 
    } 
 
}); 
 
</script> 
 

 
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> 
 

 
</head> 
 
<body> 
 

 

 
<p> 
 
    
 
<b>square root in the input text box with overline</b> for 80(√2345)68 
 
\[ 
 
\ 80\left(\sqrt{\FormInput[][][]{sqrt}}\right)68 
 
\] 
 

 
</p> 
 

 
</body> 
 
</html>

+0

@ user7515042あなたの質問に答えて更新されました。詳細はこちら[こちらをチェック](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) –

+0

ありがとうDeep !! ...実際に私は平方根と力の値を入力する計算機を作っています。したがって、ボタンを押すと、対応する値が入力テキストボックスに反映され、平方根の問題に直面してそのオーバーラインプロパティが表示されます。もしあなたがもう少し助けてくれれば、それは素晴らしいことになるでしょう。 – Rishab

+0

将来の注意:cdn.mathjax.orgの寿命が近づいているので、移行のヒントについてはhttps://www.mathjax.org/cdn-shutting-down/をチェックしてください。 –

関連する問題