Mathjax now is working well in my project. but there is one problem. is there any way to convert MathJax's formula(pure html and css) into a img file. that I can save.
MathJax can be configured to produce an SVG. See http://docs.mathjax.org/en/latest/output.html about the portability.
There is now an easy solution to produce SVG with mathjax on a server: https://github.com/mathjax/MathJax-node
For PNG see:
https://github.com/pkra/mathjax-node-svg2png