gpt4 book ai didi

jquery读取并显示在文本字段中

转载 作者:行者123 更新时间:2023-12-01 02:13:10 28 4
gpt4 key购买 nike

我的网站上有一个价格计算器。我希望 jquery 选择一个盒子上的值并将其实时发送到另一个盒子。

<form>
How much do you want to spend <input type="text" id="pricein" /><br />
This is how much you will spend<input type="text" id="priceout"/>
</form>

有人知道如何用 jquery 实现这一点吗?这听起来可能很容易,但我学得很慢,但我正在学习。谢谢!

最佳答案

$("#pricein").keyup(function() {
$("#priceout").val($("#pricein").val());
});​

DEMO

关于jquery读取并显示在文本字段中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11728961/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com