如何在jQuery中更新两个输入框 [英] how to update two input boxes in jquery
本文介绍了如何在jQuery中更新两个输入框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了两个输入文本字段,一个用于标题,另一个用于永久链接
i create two input text fields , one for title and another for permanent link
我需要在用户键入倾斜时自动更新第二个文件
i need to update the second filed automatically when user is typing the tilte
我如何在jquery/php中做这样的事情
how can i do such a thing in jquery /php
某种程度上,我正在寻找一种方法来模拟在帖子部分中永久链接的wordpress创建
somehow im looking for a way to simulate wordpress creation of permanent link in post section
推荐答案
$('#first_input_id').bind('keydown', function(e){
var inputmirror = $('#second_input_id');
inputmirror.val(inputmirror.val() + String.fromCharCode(e.which));
});
应该执行类似的操作.
这篇关于如何在jQuery中更新两个输入框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文