为什么我不能将输入值插入另一个输入?以下示例不起作用:
document.getElementById("input").oninput = () => {
const input = document.getElementById('input');
const output = document.getElementById('output');
// Trying to insert text into 'output'.
output.innerText = input.value;
};Run Code Online (Sandbox Code Playgroud)
<input id="input" placeholder="enter value of temperature" />
<br>
<input id="output" />Run Code Online (Sandbox Code Playgroud)
谢谢!
请帮我编写一个函数,使用公式计算正实数的平方根:
x i+1 = (1/2) * (xi + (A / x1)),
Run Code Online (Sandbox Code Playgroud)
其中'A' - 输入实数.
在零次迭代时,已经采用了下一个语句x0 = A该错误应该至少为10-6
产量
sqrt (2) = 1.414
sqrt (9) = 3
sqrt (25) = 5
Run Code Online (Sandbox Code Playgroud)