gpt4 book ai didi

javascript - 如何自动保存自动完成值?

转载 作者:行者123 更新时间:2023-11-28 10:21:14 25 4
gpt4 key购买 nike

如何保存在文本框中输入内容后显示的自动完成值?请参阅here(以下方文本框中输入2440为例)

在显示“按郊区搜索”的地方,我需要输入邮政编码才能查看他们接受作为自动完成值的“郊区、州、邮政编码”格式(否则不起作用)。因此,我想自动发送一堆邮政编码并保存针对该特定邮政编码显示的“自动完成值”(或“建议值”)。

我认为我可以使用 Firebug 控制台中的 javascript 来欺骗网站,使其认为是用户输入邮政编码并保存返回数据,而不是像建议一样显示它。但我不能走得太远。

你觉得怎么样?

顺便说一句,这里没有任何非法或不道德的事情。

最佳答案

如果你有 firebug,那么你可以简单地查看 ajax 请求并从响应选项卡复制 json。

这是 2440 返回的内容

> {
> "d": [
> "{\"First\":\"Aldavilla,NSW,2440\",\"Second\":\"Aldavilla,NSW,2440\"}",
> "{\"First\":\"Alstonville,NSW,2477\",\"Second\":\"Alstonville,NSW,2477\"}",
> "{\"First\":\"Ballina,NSW,2478\",\"Second\":\"Ballina,NSW,2478\"}",
> "{\"First\":\"Ballina East,NSW,2478\",\"Second\":\"Ballina
> East,NSW,2478\"}",
> "{\"First\":\"Bangalow,NSW,2479\",\"Second\":\"Bangalow,NSW,2479\"}",
> "{\"First\":\"Banora Point,NSW,2486\",\"Second\":\"Banora
> Point,NSW,2486\"}",
> "{\"First\":\"Barrington,NSW,2422\",\"Second\":\"Barrington,NSW,2422\"}",
> "{\"First\":\"Baryulgil,NSW,2460\",\"Second\":\"Baryulgil,NSW,2460\"}",
> "{\"First\":\"Bayldon,NSW,2452\",\"Second\":\"Bayldon,NSW,2452\"}",
> "{\"First\":\"Bellbrook,NSW,2440\",\"Second\":\"Bellbrook,NSW,2440\"}",
> "{\"First\":\"Bellingen,NSW,2454\",\"Second\":\"Bellingen,NSW,2454\"}",
> "{\"First\":\"Bentley,NSW,2480\",\"Second\":\"Bentley,NSW,2480\"}",
> "{\"First\":\"Bexhill,NSW,2480\",\"Second\":\"Bexhill,NSW,2480\"}",
> "{\"First\":\"Bilambil,NSW,2486\",\"Second\":\"Bilambil,NSW,2486\"}",
> "{\"First\":\"Bingara,NSW,2404\",\"Second\":\"Bingara,NSW,2404\"}",
> "{\"First\":\"Blakebrook,NSW,2480\",\"Second\":\"Blakebrook,NSW,2480\"}",
> "{\"First\":\"Boambee,NSW,2450\",\"Second\":\"Boambee,NSW,2450\"}",
> "{\"First\":\"Bobin,NSW,2429\",\"Second\":\"Bobin,NSW,2429\"}",
> "{\"First\":\"Bogangar,NSW,2488\",\"Second\":\"Bogangar,NSW,2488\"}",
> "{\"First\":\"Boggabilla,NSW,2409\",\"Second\":\"Boggabilla,NSW,2409\"}",
> "{\"First\":\"Bonalbo,NSW,2469\",\"Second\":\"Bonalbo,NSW,2469\"}",
> "{\"First\":\"Bonville,NSW,2441\",\"Second\":\"Bonville,NSW,2441\"}",
> "{\"First\":\"Boomerang Beach,NSW,2428\",\"Second\":\"Boomerang
> Beach,NSW,2428\"}",
> "{\"First\":\"Boomi,NSW,2405\",\"Second\":\"Boomi,NSW,2405\"}",
> "{\"First\":\"Booral,NSW,2425\",\"Second\":\"Booral,NSW,2425\"}",
> "{\"First\":\"Bowraville,NSW,2449\",\"Second\":\"Bowraville,NSW,2449\"}",
> "{\"First\":\"Broadwater,NSW,2472\",\"Second\":\"Broadwater,NSW,2472\"}",
> "{\"First\":\"Brunswick Heads,NSW,2483\",\"Second\":\"Brunswick
> Heads,NSW,2483\"}",
> "{\"First\":\"Bulahdelah,NSW,2423\",\"Second\":\"Bulahdelah,NSW,2423\"}",
> "{\"First\":\"Bungwahl,NSW,2423\",\"Second\":\"Bungwahl,NSW,2423\"}",
> "{\"First\":\"Burringbar,NSW,2483\",\"Second\":\"Burringbar,NSW,2483\"}",
> "{\"First\":\"Byabarra,NSW,2446\",\"Second\":\"Byabarra,NSW,2446\"}",
> "{\"First\":\"Byron Bay,NSW,2481\",\"Second\":\"Byron
> Bay,NSW,2481\"}",
> "{\"First\":\"Cabbage Tree Island,NSW,2477\",\"Second\":\"Cabbage
> Tree Island,NSW,2477\"}",
> "{\"First\":\"Carool,NSW,2486\",\"Second\":\"Carool,NSW,2486\"}",
> "{\"First\":\"Cascade,NSW,2453\",\"Second\":\"Cascade,NSW,2453\"}",
> "{\"First\":\"Casino,NSW,2470\",\"Second\":\"Casino,NSW,2470\"}",
> "{\"First\":\"Chatsworth Island,NSW,2469\",\"Second\":\"Chatsworth
> Island,NSW,2469\"}",
> "{\"First\":\"Chillingham,NSW,2484\",\"Second\":\"Chillingham,NSW,2484\"}",
> "{\"First\":\"Clarenza Via Grafton,NSW,2460\",\"Second\":\"Clarenza
> Via Grafton,NSW,2460\"}",
> "{\"First\":\"Clunes,NSW,2480\",\"Second\":\"Clunes,NSW,2480\"}",
> "{\"First\":\"Coffee Camp,NSW,2480\",\"Second\":\"Coffee
> Camp,NSW,2480\"}",
> "{\"First\":\"Coffs Harbour,NSW,2450\",\"Second\":\"Coffs
> Harbour,NSW,2450\"}",
> "{\"First\":\"Coffs Harbour Jetty,NSW,2450\",\"Second\":\"Coffs
> Harbour Jetty,NSW,2450\"}",
> "{\"First\":\"Collins Creek,NSW,2474\",\"Second\":\"Collins
> Creek,NSW,2474\"}",
> "{\"First\":\"Comboyne,NSW,2429\",\"Second\":\"Comboyne,NSW,2429\"}",
> "{\"First\":\"Condong,NSW,2484\",\"Second\":\"Condong,NSW,2484\"}",
> "{\"First\":\"Coolongolook,NSW,2423\",\"Second\":\"Coolongolook,NSW,2423\"}",
> "{\"First\":\"Coopernook,NSW,2426\",\"Second\":\"Coopernook,NSW,2426\"}",
> "{\"First\":\"Coorabell,NSW,2479\",\"Second\":\"Coorabell,NSW,2479\"}"
> ] }

enter image description here

关于javascript - 如何自动保存自动完成值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5596601/

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