javascript:gaddress-finder
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
javascript:gaddress-finder [2011/04/20 22:26] – [Google日本語入力APIを使って郵便番号から住所を取得 - GAddress Finder] dgbadmin | javascript:gaddress-finder [2015/09/22 14:42] (現在) – [ダウンロード] dgbadmin | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== 郵便番号から住所を取得するJavaScript(DB不要、Google日本語入力APIからJSONPで取得する) - GAddress Finder ====== | + | ====== |
{{: | {{: | ||
行 11: | 行 11: | ||
というわけでGoogle日本語入力APIからJSONPを使って郵便番号に対する住所を取得するJavaScriptツールを作った。\\ | というわけでGoogle日本語入力APIからJSONPを使って郵便番号に対する住所を取得するJavaScriptツールを作った。\\ | ||
- | [[http:// | + | [[google-calendar-holidays|GCalendar Holidays]]、[[Google Mapper|Google Mapper]]に次ぐ「Gシリーズ」だ。 |
これでもう郵便番号データベースの更新に手を煩わせなくて済む。住所入力フォームを作るときも、サササのサッだ。\\ | これでもう郵便番号データベースの更新に手を煩わせなくて済む。住所入力フォームを作るときも、サササのサッだ。\\ | ||
行 37: | 行 37: | ||
===== ダウンロード ===== | ===== ダウンロード ===== | ||
- | [[http:// | + | [[http://g.0-oo.net/ |
※ダウンロードできるのは最新のBeta版の場合もあります | ※ダウンロードできるのは最新のBeta版の場合もあります | ||
行 45: | 行 45: | ||
<code javascript> | <code javascript> | ||
/** | /** | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
* | * | ||
- | * See also | + | |
- | | + | |
*/ | */ | ||
var GAddressFinder = {}; | var GAddressFinder = {}; | ||
/** | /** | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
*/ | */ | ||
GAddressFinder.call = function(zip, | GAddressFinder.call = function(zip, | ||
行 80: | 行 80: | ||
var url = "// | var url = "// | ||
- | url += "? | + | url += "? |
var script = document.createElement(" | var script = document.createElement(" | ||
行 90: | 行 90: | ||
}; | }; | ||
/** | /** | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | | ||
*/ | */ | ||
GAddressFinder.set = function(zipId, | GAddressFinder.set = function(zipId, | ||
行 127: | 行 128: | ||
if (result) { | if (result) { | ||
zip.value = result; | zip.value = result; | ||
+ | return true; | ||
} else { | } else { | ||
alert(" | alert(" | ||
+ | return false; | ||
} | } | ||
}; | }; | ||
/** | /** | ||
- | | + | |
- | | + | |
*/ | */ | ||
GAddressFinder.callback = function(results) { | GAddressFinder.callback = function(results) { | ||
- | this._userCallback(results[0][1][0].match(/ | + | this._userCallback(results[0][1][0].match(/ |
}; | }; | ||
/** | /** | ||
- | | + | |
- | | + | |
- | | + | |
*/ | */ | ||
GAddressFinder._toHan = function(before) { | GAddressFinder._toHan = function(before) { |
javascript/gaddress-finder.1303305973.txt.gz · 最終更新: 2011/04/20 22:26 by dgbadmin