タスクは非常に具体的で、PDA用のWebアプリケーションを開発している場合にのみ発生します。
私の友人は私にそれを提案した。 彼はスキャナーを使用して在庫残高に関する情報の収集を実施しました。 つまり コードを読み取ってWindows Mobileを実行する特別なデバイス。製品範囲が保存されているサーバーにWiFi経由で接続されます。 これはWebアプリケーションとして実装されましたが、シンですが、あまりクライアントではありません-Operaです。 タスクの1つは、インターフェイスで作業する時間を節約し、繰り返し行われる日常的な操作を最小限に抑えるか、完全に排除することです。 タスクは、入力に自動的に焦点を当てることです。
Operaの入力に対するフォーカスメソッドが期待どおりに機能しないことが判明しました-入力KEY_DOWNに対してこのメソッドを呼び出すと、この要素はキャッチされません。
解決策はシンプルで、かなりランダムに見つかりました。 textareaでフォーカスが正しく機能することが判明しました。 必要に応じて、textareaはcssを入力と同じ形式にすることができます。
作業例のコード:
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .
< html > < body > < form > < textarea name ="title" id ="title" > sample </ textarea > < strong ></ strong > </ form > </ body > < script > window.focus(); var v = document .getElementById( 'title' ); v.onfocus = function () { document .getElementsByTagName( 'strong' )[0].innerHTML = 'Yes!!' ; } v.select(); v.focus(); </ script > </ html > * This source code was highlighted with Source Code Highlighter .