»
Tiếng AnhTiếng PhápTiếng Việt

In - Vẽ đồ thị sin,cos - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Đồ họa » Vẽ đồ thị sin,cos
URL: http://www.javascriptbank.com/javascript-graphing-utility-index.html

Vẽ đồ thị sin,cos © JavaScriptBank.comHiệu ứng là một công cụ vẽ đồ thị sin,cos trên trang web.

Phiên bản đầy đủ: jsB@nk » Đồ họa » Vẽ đồ thị sin,cos
URL: http://www.javascriptbank.com/javascript-graphing-utility-index.html



CSS
<STYLE type=text/css>BODY {FONT: 12px verdana,arial,helvetica,sans-serif; WIDTH: auto; COLOR: #000000; HEIGHT: 100%; BACKGROUND-COLOR: #ffffff}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT src="JavascriptGraph.js" type=text/javascript></SCRIPT><SCRIPT language=javascript type=text/javascript>// author: Lokesh Gyanwali        function GetValue(id, isNumber)        {            var val = document.getElementById(id).value;            return isNumber ? parseFloat(val) : val;        }        function TryGraph()        {            var Gphs = new GraphObj(GetValue("func", false), GetValue("xMin", true), GetValue("xMax", true), GetValue("yMin", true), GetValue("yMax", true), GetValue("scale", true), document.body.clientWidth /2, document.body.clientHeight /2, GetValue("increment", true));            Gphs.Draw();        }        </SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
Funct: <INPUT id=func value=5*Math.cos(x)*Math.sin(x)/x>       xMin: <INPUT id=xMin size=3 value=-10> xMax: <INPUT id=xMax size=3       value=10> yMin: <INPUT id=yMin size=3 value=-1.5> yMax: <INPUT id=yMax       size=3 value=5.5> scale: <INPUT id=scale size=3 value=20> increment:       <INPUT id=increment size=3 value=0.01> <INPUT onclick=TryGraph() type=button value=Draw><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/graphic/JavaScript_Graphing_Utility/JavascriptGraph.js