我一直在尝试用javascript制作一个计算器。每当我选择毕达哥拉斯定理,然后输入它应该解决的值,它返回NaN。我不确定为什么它不会返回值。
<form class="real-submit-form" action="#">
<h2>Form 1</h2>
<label>Required Field:
<input type="text" required />
</label>
<input type="submit" value="I am a real Submit" />
</form>
<form class="click-button-form" action="#">
<h2>Form 2</h2>
<label>Required Field:
<input type="text" required />
</label>
<input type="button" class="click-button" value="I am a Button [ .click() ]" />
<input type="submit" value="I am also a real Submit... (but hidden!)" />
</form>
<form class="submit-button-form" action="/">
<h2>Form 3</h2>
<label>Required Field:
<input type="text" required />
</label>
<input type="button" class="submit-button" value="I am a Button [ .submit() ]" />
</form>