簡単に設置できる郵便番号検索
簡単に自分のフォームに、郵便番号検索を設置することができるソースです。
⇒ http://code.google.com/p/ajaxzip3/
● HTMLヘッダ設定例
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>サンプル</title>
<script src=”http://ajaxzip3.googlecode.com/svn/trunk/ajaxzip3/ajaxzip3.js” charset=”UTF-8″></script>
</head>
● 1ボックスで郵便番号7桁を入力させる場合の設定例(都道府県と以降の住所を分ける場合)
<input onkeyup=”AjaxZip3.zip2addr(this,”,’pref01′,’addr01′);” maxlength=”8″ name=”zip01″ size=”10″ type=”text” />
<input name=”pref01″ size=”20″ type=”text” />
<input name=”addr01″ size=”60″ type=”text” />
● 1ボックスで郵便番号7桁を入力させる場合の設定例(都道府県と以降の住所を分けない場合)
<input onkeyup=”AjaxZip3.zip2addr(this,”,’addr11′,’addr11′);” maxlength=”8″ name=”zip11″ size=”10″ type=”text” />
<input name=”addr11″ size=”60″ type=”text” />
● 2ボックスで郵便番号を3桁-4桁形式で入力させる場合の設定例
<input maxlength=”3″ name=”zip21″ size=”4″ type=”text” /> - <input onkeyup=”AjaxZip3.zip2addr(‘zip21′,’zip22′,’pref21′,’addr21′,’strt21′);” maxlength=”4″ name=”zip22″ size=”5″ type=”text” />
<input name=”pref21″ size=”40″ type=”text” />
<input name=”addr21″ size=”40″ type=”text” />
<input name=”strt21″ size=”40″ type=”text” />
コメントはまだありません »
コメントはまだありません。
コメントする