下のフォームに郵便番号を入力してください。設定もフィールドの指定も要らず、残りは自動で埋まります。Type a Japanese postcode into the form below. Everything else fills itself, with no configuration and no field wiring.
フィールドを検出しています…Discovering fields…
まだ検索していません。Nothing looked up yet.
npm install jusho-jp
import { autofill } from 'jusho-jp';
autofill({ baseUrl: 'https://jusho.srh.workers.dev' });
フィールドは autocomplete 属性、次に name と id の慣習、最後にラベルの文言から判別します。値はネイティブのセッター経由で書き込むため、React や Vue でも検知されます。すでに入力済みの欄は上書きしないので、試してみてください。
Fields are found by autocomplete attribute, then name/id
convention, then label text. Values go through the native setter so React and Vue notice.
A field you have already typed into is never overwritten, so try it.