「マウス移動時に発生するイベント」サンプルコード <html> <head> <title>event.onmousemove - マウス移動時に発生するイベント</title> </head> <body> <!--マウス移動時に発生するイベントのサンプル--> <button onmousemove="alert('マウスが上をとおりました');">ボタン</button> </body> </html>
サンプルと機能 → Sample 1:ドラッグして画像を移動する ドラッグして、画像を移動させます。 キャラクターの洋服の着せ替えなども実現できます。 Netscape Navigatorには対応していません。 サンプルスクリプト 緑の文字が変更箇所で、赤い文字が対応するスクリプトです。 "//"以下はコメントです。削除しても影響ありません。 必要な箇所をコピー&貼り付けして編集してください。 → Sample 1:ドラッグして画像を移動する <HTML> <HEAD> <TITLE></TITLE> <SCRIPT language="JavaScript"> <!-- // ドラッグして画像を移動する x = 40; // マウスと画像の縦方向の距離 y = 30; // マウスと画像の横方向の距離 flag = false; window.docume
jQueryとは、JavaScriptのコーディングを強力に支援するライブラリです。 $('.semooh a').hover( function(){ $(this).text('ヌ?'); }, function(){ $(this).text('ヌー'); } );
JavaScript のグローバル関数のひとつである isNaN は対象の値が NaN (Not a Number) かどうかを調べ、 true または false を返します。ここでは isNaN 関数の使い方について解説します。 ※ グローバル関数の isNaN と似たものとして Number オブジェクトで Number.isNaN メソッドが用意されており、より厳格に NaN かどうかを調べます。詳しくは「値がNaNかつ数値型であるかどうかを調べる(Number.isNaN)」を参照されてください。
遊:あー 面倒くさい なぜ必修クラブなんて あるのよ 守:ねえ遊ちゃん どこにする? 遊:守はどこ 希望なの? 守:遊ちゃんが入る ところでいいよ 遊:そうね プロ部は手抜きが できると聞いたわ 守:プロ部? 遊:とりあえず そこにしましょう きっと楽なクラブよ ナレ:必修クラブ の時間──(教室にいる3人) 麗:プロ部なんて わけの分からない クラブになるなんて… 遊:あれ 麗 どうしたの? テニス部じゃないの? 麗:ジャンケンに 負けたのよ 守:高美舎さん 実力はあるけど 運はないもんね 麗:くっ 屈辱だわ 先生:おっ 集まっているな 担当の桑立だ 遊:知っています 昼行灯と評判の 先生ですね 先生:お前なあ… 守:ねえ遊ちゃん まじめにしようよ 麗:つかぬことを伺います プロ部の『プロ』って 何ですか? 先生:プログラムの 『プロ』だ 3人:プログラム!? 先生:そうだ お前たち3人
WARNING: The canonical authorized URL for this project is https://mochi.github.io/mochikit/. The domain name mochikit.com is no longer affiliated with this project or its maintainers. Control over the domain was lost due to an acquisition in 2010 and has not been affiliated with this project since 2014. Any material you find on that site, or emails coming from that domain, should be considered sus
Ajax とは Asynchronous JavaScript + XML の略で、 Web サーバーとブラウザとの間で非同期通信を行う方法です。 Ajax の方法を利用することで、ページを切り替えることなくページの内容を書き換えることができるようになります。 JavaScript では Aax を用いた非同期通信には XMLHttpRequest オブジェクトを使用します。ここでは Ajax を使った非同期通信を行う方法について解説します。
switchを使って四則演算のプログラムを作りました。 以下プログラム <html> <head> <title>kadai05</title> <script type=text/javascript> function Calc(n) { a = parseInt(document.f.a.value); b = parseInt(document.f.b.value); switch (n) { case 1 : Ans = a + b; break; case 2 : Ans = a - b; break; case 3 : Ans = a * b; break; case 4 : Ans = a / b; break; } document.f.c.value = Ans; } </script> </head> <body> <center> <h3>四則演算</h3> <fo
前回めでたくクロスドメインからレスポンスもらえるようになったけど、Cookieが送れなかった件。 参考をよーく見直してみたら、なんかCookieセットできそうな文章を発見。で、再度お試し。 RPC側を次のように修正。Access-Control-Allow-Credentialsヘッダーを追加する。 <?php header('Access-Control-Allow-Origin:http://localhost'); header('Access-Control-Allow-Credentials:true'); header('Content-Type:text/plain;charset=UTF-8'); $msg = ' World'; if(isset($_COOKIE['_test_'])) { $msg = ' Again'; } else { setcookie('_te
Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own. An example of a cross-origin request: the
2010年08月17日06:45 カテゴリLightweight Languages Ajax - Goodbye, JSONP. Hello, Access-Control-Allow-Origin もうそろそろJSONPとはお別れできるのではないかと思い立ったので。 XMLHttpRequestとその問題 AjaxといえばXHRの愛称で親しまれているXMLHttpRequestですが、これには一つ重大な欠点がありました。 これを発行するDHTMLページのドメインが、Request先のドメインと一致する必要があったのです。いわゆる Same Origin Policy というやつです。おかげでサイトをまたがって使えなかったのです。これではマッシュアップできない。どうしよう。 JSONPとその問題 そこで生まれたのが、JSONPという手法です。 これは、scriptノードを追加した時に、単
なんだかレイアウトがおかしい。 Origin null is not allowed by Access-Control-Allow-Origin.jQuery のオフラインラーニングキットがあるということで、 IDEA*IDEA ~ 百式管理人のライフハックブログ: オフラインでjQueryを学ぶための教材がまるごと詰まった『jQuery 1.4.3 Offline Learning Kit』 AddyOsmani.com: jQuery 1.4.3 Offline Learning Kit 中身拝見してみました。 「jquery1.4.3-offline-learningkit.zip」をダウンロードして展開、「展開先/jquery1.4.3-offline-learningkit/jqapi-offline-1.4.3-documentation/index.html」を Chrom
XMLHttpRequest Level 1 W3C Working Group Note 06 October 2016 This version: https://www.w3.org/TR/2016/NOTE-XMLHttpRequest-20161006/ Latest published version: https://www.w3.org/TR/XMLHttpRequest/ Latest editor's draft: https://xhr.spec.whatwg.org/ Previous version: https://www.w3.org/TR/2014/WD-XMLHttpRequest-20140130/ Editors: Anne van Kesteren, Mozilla Julian Aubourg, Creative Area 송정기 (Jungkee
How do I start? Check out the developer's guide to get the Libraries API up and running on your website or application. Play with the code in our code playground. Want to talk to other developers using this API? Check out the Google API discussion group. You can also interact with developers in realtime on our IRC channel. What is the Google Libraries API? The Libraries API is a content distributi
Lightweight Footprint Only 30kB minified and gzipped. Can also be included as an AMD module CSS3 Compliant Supports CSS3 selectors to find elements as well as in style property manipulation What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use
こりゃ面白い。http://code.google.com/p/phantomjs/ "PhantomJS is a minimalistic, headless, WebKit-based, JavaScript-driven tool" headless=スクリーンがない=コマンドと考えればいい。要はブラウザから画面と取り除いてJavaScriptによるスクリプティングを可能にしたコマンドツール。逆に言うとDOM+JavaScript+Networkingをコマンドにしたもの。 説明してもピンとこないだろうから実例を紹介する。http://code.google.com/p/phantomjs/wiki/QuickStart hello world hello.js console.log('Hello, world!'); phantom.exit();$ phantomjs hel
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く