タグ

JScriptに関するmonjudohのブックマーク (2)

  • jTip - The Jquery Tool Tip

    What is this? | Download This Example Roll over a question mark: Password? User ID? Try adjusting the browser window so the links in the paragraphs below are as close to the right side of the window as possible. Roll over a link in the paragraphs below. This demonstrates how the tool tip will flip horizontally depending upon the space between the tool tip and the right side of the window. Don't wo

  • WSH で HTML を XPath したいんじゃあああぁぁ - Wisteria::Diary

    CompleteX で文脈依存のヘルプを表示するために、各種ライブラリ (たとえば 田楽 DLL) のドキュメントを INI ファイル形式に変換したい。ただし、できるだけロバストな記述で*1。具体的には 素の Windows + IE 環境で (不特定多数の一般ユーザーのマシンで*2 ) 必ずしも well-formed でない HTML 文書を対象として XPath を使って内容をスクレイピングしたい という、一見ありがちな要求。なんだけど……これが全く一筋縄では行かないどころか五筋縄以上かいくぐる羽目になりましたことよ。 結論 現在のところ Windows + IE だけでは不可能。サードパーティの XPath 実装を使えば可能。 0 筋縄: 方針の確認 まず、対象が純粋な XML なら簡単にできることを確認。 var dom = WScript.CreateObject("MSXML

    WSH で HTML を XPath したいんじゃあああぁぁ - Wisteria::Diary
    monjudoh
    monjudoh 2009/09/01
    fso.OpenTextFile("hoge.html");でファイルを開いて文字列として取得、var document = WScript.CreateObject("htmlfile");でdocumentオブジェクトを取得できる
  • 1