JSFiddle - React, Tailwind, and code Playground

by Naydenov_it

HTML

<form method="post" name="form">
		<span>Insert x=</span><input  type="text" name="x" maxlength="512" id="x" />
		<span>Insert y=</span><input  type="text" name="y" maxlength="512" id="y" />
		<input type="button" value="Evaluate" onclick="myF()">
	</form>
	<div id="resultDiv"></div >

JavaScript

var myF=function myF(){
    var inputX=document.getElementById("x").value ; 
    var inputY=document.getElementById("y").value ; 
    var r = 25;
    var point = (inputX * inputX) + (inputY * inputY);
    if( inputX >=0 &&  inputY >=0)
    {
        var show=function(){
        var result= ((point <= r) ? "The point is inside the circle !" : "The point is outside the circle !")
        document.getElementById("resultDiv").innerHTML = result.toString() ;
        }()
    }
}