有没有脚本可以在java脚本中显示数学符号?

问题描述:

enter image description here我想在我的表单中显示一个数学符号,是否有脚本这样做?有没有脚本可以在java脚本中显示数学符号?

//一些代码

这样图像

[数学符号] [2] enter image description here

+0

图像不加载 – Walk

你的符号与纯HTML的限制,有些是:

<p>I will display &sum;</p> 
 
<p>I will display &minus;</p> 
 
<p>I will display &times;</p> 
 
<p>I will display &radic;</p> 
 
<p>I will display &int;</p> 
 

 
<a href="https://www.w3schools.com/charsets/ref_utf_math.asp">SOURCE</a>

如果你严重不过,考虑使用这个库(它的启动文件):

https://www.mathjax.org/

与文档在:

http://docs.mathjax.org/en/latest/start.html

你可以简单地做到这一点(与mathjax):

<script type="text/javascript" async 
    src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"> 
</script> 

然后输入像这样的数学字符串:

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are 
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ 

他们的一个例子是:

<script type="text/javascript" async 
 
    src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"> 
 
</script> 
 
<script type="text/x-mathjax-config"> 
 
    MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); 
 
</script> 
 
<div> 
 
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are 
 
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ 
 
</div>

(对不起,我不能看到您发布的图像,它wouldnt加载)

不管怎么说,希望这有助于!

+0

我想特别的数学符号 调制和置换符号,...... –

+0

是,MathJax具有所有的数学符号,看看链接靠近底部 –

+0

我会的,谢谢。 –