Opera Mobile 9.5 for Pocket PCに焦点を当てる

タスクは非常に具体的で、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 .



  1. < 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 .



  2. < 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 .



  3. < 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 .



  4. < 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 .



  5. < 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 .



  6. < 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 .



  7. < 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 .



  8. < 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 .



  9. < 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 .



  10. < 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 .



  11. < 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 .



  12. < 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 .



  13. < 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 .



  14. < 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 .



  15. < 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 .



  16. < 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 .



  17. < 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 .



  18. < 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 .






All Articles