Updated: 2005-10-23 01:00:16+0900 - [ HOME ] Download Selection.js Usage var selection = new Selection(document.getElementById("textAreaId")); var s = selection.create(); alert("start:" + s.start + ", end:" + s.end); Example example.html How to create selection from TextRange object. Create marker which is not included in the textarea contents. var marker = notIncludedRandomString(contents); Appen
Over the last several months, a small group of web developers and designers have been hard at work perfecting a method to insert rich typography into web pages without sacrificing accessibility, search engine friendliness, or markup semantics. The method, dubbed sIFR (or Scalable Inman Flash Replacement), is the result of many hundreds of hours of designing, scripting, testing, and debugging by Mi
DOM仕様書にこれらのプロパティについて図解入りで説明がありわかりやすい。 文字を選択した時に表1のプロパティがどのように変化するかを表示するサンプル。 http://www.bit-hive.com/~tomita/RangeDump/ JavaScriptのソースはhttp://www.bit-hive.com/~tomita/RangeDump/range.js 3. 現在の選択範囲の取得の仕方(IEの場合) IEのRangeオブジェクトにはテキストの選択範囲を表すTextRangeと画像などのコントロールオブジェクトの選択を表すControlRangeの2種類が存在する。 3.1 TextRange,ControlRangeの取得 IEの場合Selectionはdocument内に既にあるので以下のようにして取得できる。 var range = document.selection
2012/07/22 追記 久しぶりに確認したところ、IE9 では以下で指摘している IE (このときは IE6 でした) の問題(3, 4, 6)がすべて解消されていました。 また、Firefox での問題(5)も Firefox14 で試したらは解消されていました(ただ、All-in-One Sidebar のパネルの上では mousemove イベントが発生しないようでした)。 Chrome20 や Safari5 でも問題無く動作していますから、現在においてドラッグ&ドロップを実装するには mousedown 時の preventDefault() だけでOKと言えそうです。すばらしいですね! safari で動かないらしいのでどなたか情報ください!(くやしい!) というかこういうのに勝ち負けはないので実装できてる方は是非トラックバックお願いします。当方既に ipod 中毒ですし
ぱっと見はいいんだけど細かいところでちょこちょこ穴があるような気がする Safari (というより Apple WebKit) ですが、どのような穴がいつふさがれてきたのかまとめてみました。最初は JavaScript 関係だけ調べるつもりだったのですが Safari 2.0.3 で setSelectionRange がサポートされたというのを聞いたのでそっちのほうも少し。ただし、手元に Mac 環境がないので実際に Safari で試したわけではありません。すべてソースと変更履歴から推測しただけなのでそのつもりで。 下の表で「WebKit」というのはその機能が実装された WebKit の (正式公開) バージョン、「Safari」というのはそのときの Safari のバージョンをあらわしています。「-」はその機能が現時点 (Safari 2.0.3) でも未実装ということです。「-」は
Tips, techniques, and tutorials for the jQuery JavaScript library Introduction and Caveat I’m sure that some of you were expecting this entry to discuss traversing the DOM using jQuery methods. After all, I said I would do just that in my last entry. But a couple nights ago, I had the impulse to try a “live comment preview,” so I’m going with it. My next entry, then, will be “How to Get Anything Y
Why include an entire library when you only need part of it? Nomadic Functions are small, optimized functions that require no (or little) library. The aim is to create modules that can be effortlessly combined, creating more complex programs. If you have any comments, suggestions, or code contributions feel free to contact us.
はじめに ここ最近、Web 2.0という言葉と共にクライアント側のプレゼンテーション技術としてAjaxが非常に注目されています。しかし、Ajaxという技術用語や概念の解説、または書籍が多く出版されているにもかかわらず、Ajaxを応用したコンテンツやアプリケーションは、キーワードとしてのAjaxの人気から考えれば、少ないと言えるでしょう。多くの人がGoogleなどの大手サイトでAjaxを体験しているにもかかわらず、Ajaxが使われているのは企業や大手ポータルサイトなど、限定されています。 では、Ajaxはそれほど敷居の高いものなのでしょうか。質の高い開発集団や、高額な開発環境、またはサーバーなどのインフラストラクチャが必要となるのでしょうか。確かに、Googleと同じレベルのものを作ろうと考えれば、相応の費用と技術が要求されます。しかし、Ajaxという技術要素だけを見れば、けっして大企業に独
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く