開発環境
- OS X Lion - Apple(OS)
- Safari、Firefox + Firebug (Webプラウザ、プラグイン)
- BBEdit - Bare Bones Software, Inc.(Text Editor)
- Script言語:JavaScript
- JavaScript Library: jQuery
『初めてのJavaScript 第2版』(シェリー・パワーズ著(Shelley Powers著)、武舎 広幸+武舎 るみ訳、オライリー・ジャパン、2009年、ISBN978-4-87311-425-5) の11章(ドキュメントオブジェクトモデル)練習問第11-5.を解いてみる。
その他参考書籍
5.
コード(BBEdit)
var result = "id属性で取得: " + $('#elem1').text() + "\n" + "classNameで取得: " + $('.thediv').text() + "\n" + "div要素集合のインデックスで取得: " + $('div :eq(127)').text() + "\n"; $('#pre0').text(result);
このテキストを取得
0 コメント:
コメントを投稿