Google Mapを使うとき、特定の場所の緯度・経度を取得したいことが多々あります。 公式ドキュメントにあるように、住所をクエリー送信して取得すればよいのですが、微妙に位置がズレてるときってないですか? 緯度・経度の数値をチビチビと調整するのは、あまりにも面倒なので。 地図上のマーカーをドラッグ&ドロップできるようにして、その位置の緯度・経度を表示するスクリプトです。 (2012/10/23追記)以下はver.2時代の例です。これではなく、新しいAPIを使うことをお勧めします。このページのデータは、とりあえず放置中です…。 (2013/02/04追記)ずっと放置もアレなので、新しいGoogle Map API(ver.3)対応のサンプルを公開しました。ver.2は正式に廃止予定なので、古いコードは早めに書き換えましょう。 (2014/05/24追記) サポート終了についてはこちら:htt
iモードブラウザ2.0のJavaScriptを調査・研究する過程で、iモード専用サイトのhtmlソースを閲覧する方法を発見しました。 今回発見した方法を用いれば、「ドコモ・ゲートウェイ以外からのアクセスを禁止している」、「サーチエンジンのクロールを禁止している」、「XSS脆弱性が存在しない」の三つの条件を満たしているiモード専用サイトでも、htmlソースを閲覧することができます。 しかし、htmlソースを閲覧するためには、そのiモード専用サイトが別の二つの条件を満たしている必要があります。 htmlソースが閲覧可能なiモード専用サイトの条件 デフォルトホストで運用されている。(ヴァーチャルホストではない) iモードブラウザ2.0のJavaScriptからのアクセスを禁止していない。 iモード専用サイトのhtmlソースの閲覧方法 iモードブラウザ2.0のJavaScriptで、htmlソース
JavaScriptで本格的なプログラミングの世界に触れてみよう。連載を通じて実用的なアプリケーションを作れるようになるはず!?(編集部) JavaScriptってよく聞くけど何だろう? JavaScriptは、Webブラウザ上で動かすことのできる簡単なプログラム言語です。HTMLだけでは動くWebページはできませんが、JavaScriptを使うとWebページにさまざまな動きを入れることができるようになります。 プログラム言語と聞くと、なんだか難しそうに感じてしまうかもしれませんが、心配はいりません。 本講座は、HTMLは分かるけどプログラムを書いたことがないという人や、デザインは得意だけどプログラムは全然分からない! 文科系で数学は苦手! という人が理解できるような入門講座として、JavaScriptの基本から進めていきます。 用意するものはメモ帳などのテキストエディタとWebブラウザだ
こんにちは。ライブドアの駒井です。 つい先日、友人に誘われて半ば強制的に「Firefox Developers Conference 2009」に参加してきました。誘ってきた友人が、当日の急用で北海道に帰る事になり、何故か私1人で不慣れな場に参加してきました。当日優しくしてくれた皆さんありがとうございました。いただいたFirefoxのTシャツも大事にします。 自分の予想に反してとっても有意義な時間となりました。筆者は普段、JavaScriptを全く書きません。C++とJAVAがメインです。そんな私でも気軽に楽しめてしまうのがFirefoxアドオンでした。ということで、Firefoxアドオンを作成するための最低構成で、簡易的なアドオンを15分程度で実験的に作ってみたいと思います。 題材を模索中に自社営業部の人から次のようなアドオンがあったらありがたいと聞きました。営業訪問に際して必ず行う下記
Googleは米国時間11月5日、「Closure Tools」と呼ばれるプロジェクトをリリースし、同社のウェブサイトおよびウェブアプリケーション作成レベルに達することを望む開発者をサポートしていく方針を明らかにした。 Googleは、ウェブ中心のビジョンの一環で、JavaScriptを用いたウェブベースのプログラム記述を強く推進している。確かにGoogleは、「Gmail」や「Google Docs」などのサービスを通じて、JavaScriptを最大限に活用しており、より高速にJavaScriptプログラムを実行できるようにする目的もあって、「Chrome」ブラウザの開発に努めてきた。 しかしながら、JavaScriptプログラムは時に異なるブラウザ上では異なった動作をするなどの理由から、高機能なJavaScriptの記述、デバッグ、最適化は困難なものともなってきた。Googleがオープ
奥様 と プログラム と お犬様 の 楽しい日常 目次 ホーム 連絡をする RSS Login Blog 利用状況 投稿数 - 193 記事 - 1 コメント - 19813 トラックバック - 27 ニュース なおこ(・∀・)@わんくま同盟 お世話になっている方のリンク お犬様同盟 pu2pu2(ぷにぷに) share-ride ナツの日々 鈴りんRing 黒柴ブログ 不二子ちゃ~ん 現在また JDK1.4 めいた、struts めいたお仕事をしています。 お客様のご要望で、 IE の showModalDialog でモーダルダイアログ表示した画面の中で post で submit して別画面へ画面遷移する、という事をしなくてはならなくなりました。 ダイアログ内で画面遷移とな...。 とにかくお仕事なのでやらないといけません。 ところが、showModalDialog をまともに使った
個人的な備忘録。 トップページページ一覧メンバー編集 PDFの自動印刷 最終更新: choco927 2008年07月17日(木) 10:14:16履歴 Tweet PDFを自動で印刷する。 <html> <head> <script language="JavaScript"> <!-- function print() { // 印刷処理実行 objPdf.printAll(); } //--> </script> <title>自動印刷</title> </head> <body onload="print()"> <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" height="600" id="objPdf" width="800"> <!-- PDFのパスを指定 --> <param name="src"
ここでは、「windows.showModalDialogは画面をキャッシュする」 に関する記事を紹介しています。 JavaScript のwindows.showModalDialog を使うと 画面がキャッシュされて、初回表示時の画面になってしまう。 ASP.NETを使おうがJSFを使おうがこの現象は起きる。 対策案1:ダミーパラメータ(時刻とな)を付けて呼び出す。 var dummy = new Date().getTime(); windows.showModalDialog("hoge.html?dummy=" + dummy,~~) #URLが前回と異なるとキャッシュが使われないことを利用して 対策案2:キャシュさせない設定にする。 head部に <meta http-equiv="Expires" content="-1"> <meta http-equiv="Cache-C
JavaScript でいろいろな日付の計算関係をまとめてみました。前回の日付関係のまとめエントリの JavaScript版です。 日付の単位について 基本的なことですが、一応まとめておきます。 1秒は1000ミリ秒 1分は60秒 1時間は60分 よって 1時間=60分=3600秒=3600000ミリ秒 1日=24時間=1440分=86400秒=86400000ミリ秒 現在時刻の取得 まずは、最もよく使う処理です。 //今日の日時を表示 var date = new Date(); document.write(date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.get
Visit dojo.io for documentation, examples, and more on Dojo, the Progressive Framework for Modern Web Apps and successor to the Dojo Toolkit Dojo Toolkit 1.17 A JavaScript toolkit that saves you time and scales with your development process. Provides everything you need to build a Web app. Language utilities, UI components, and more, all in one place, designed to work together perfectly. Get Dojo
ここに書いているのは、新しいHTMLを{普通に/モードレスダイアログ[/2007-08-12]で/モーダルダイアログで}開く方法 。 単純なメッセージ表示や文字の入力は別の命令を使う。 まずは、普通にリンクで移動する方法 HTML: <A HREF="dialog_target.html">普通に移動</A> <INPUT TYPE="button" VALUE="スクリプトで移動" onClick="window.location='dialog_target.html'"> <!-- location.href ='dialog_target.html'でも可 --> サンプル:普通に移動 サンプル: モードレスダイアログで開く方法 新しいウィンドウを開いて(ポップアップ)、そこにHTMLを表示させる方法。 モードレス(modeless)というのはモーダルの反対で、そのウィンドウを開い
FirefoxがCPUを常に15%ぐらい食うのが気になっていたので調べてみたら、Googleのトップページを開くとものすごい勢いでJavaScriptが実行されることがわかった。具体的には、var k=t.value;k!=h&&X(0);h=k というコードが毎秒100回実行されている。このせいで、自分の使っているPCだと、Googleのトップページを開くだけでCPU使用率が2%ぐらい上がっているようだ。Firefox特有の問題というよりは、ウェブページ側の作り方に依るものみたいだ。たぶん他のブラウザでも問題は変わらないだろう。 Googleのトップページの場合、コードを調べてみた限りでは、原因はどうも検索候補の自動補完用のコードみたいだ。現在の入力文字列が過去の記録と違ったら補完の提示をやり直す、みたいなことをやっているように見える。 HTMLではテキストボックス内のテキストが変更され
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く