如何自动显示2位数的最后一个电话号码,第二个文本框?第二个、位数、文本框、电话号码

2023-09-10 17:07:50 作者:「危險」人物

如何显示2位数的最后一个电话号码,当我输入电话号码,第一个文本框,并自动显示与AJAX或JavaScript或jQuery的第二个文本字段?

How to display 2 digits the last phone number when I input phone number to first text field and display automatic to second text field with AJAX or JavaScript or jQuery ?.

我想剧本有关,我的网站如该影片。

I want to get script about that for my website like this video.

我搜索无处不在谷歌搜索这件事,我只找到这个JavaScript 。

I've searched everywhere in Google Search about that, I only found this JavaScript.

但是,这不是解决办法。请帮我解决解决方案,我该怎么办。

But that is not solution. Please help me to resolve solution and what should I do.

我在哪里可以得到AJAX或JavaScript或jQuery的一样,还是有soluton在这个论坛?

Where I can get AJAX or JavaScript or jQuery like that or are there soluton in this forum ?

推荐答案

在code,你发现,改变

In the code you found, changing

$('#output').text($('#txt').val());

$('#output').text($('#txt').val().substr(-2));

将是你所需要的。

would be what you need

$('#output').value($('#txt').val().substr(-2));

如果输出<输入类型=文本> 元素