Создание IntelliSense/автоматического заполнения в JavaScript

Используйте ДОБИРАЮТСЯ, когда Вы хотите, чтобы URL отразил состояние страницы. Это полезно для просматривания динамично сгенерированных страниц, таких как замеченные здесь. POST должен использоваться в форме для представления данных, как то, когда я нажимаю кнопку "Post Your Answer". Это также производит более чистый URL, так как это не генерирует строку параметров после пути.

6
задан David DeWinter 28 November 2009 в 20:21
поделиться

2 ответа

It coculd be interesting to checkout the implementation of event object in DOJO toolkit.

Dojo provides the following attributes with an event object:

  • event.target - the element that generated the event
  • event.currentTarget - the current target
  • event.layerX - the x coordinate, relative to the event.currentTarget
  • event.layerY - the y coordinate, relative to the event.currentTarget
  • event.pageX - the x coordinate, relative to the view port
  • event.pageY - the y coordinate, relative to the view port
  • event.relatedTarget - For onmouseover and onmouseout, the object that the mouse pointer is moving to or out of
  • event.charCode - For keypress events, the character code of the key pressed
  • event.keyCode - for keypress events, handles special keys like ENTER and spacebar.
  • event.charOrCode - a normalized version of charCode and keyCode, which can be used for direct comparison for alpha keys and special keys together. (added in 1.1)
0
ответ дан 17 December 2019 в 22:13
поделиться

window.getSelection и связанные с ним методы могут быть тем, что вы ищете. Вы можете рассчитать положение курсора на экране, используя функции смещения и т. Д.

1
ответ дан 17 December 2019 в 22:13
поделиться
Другие вопросы по тегам:

Похожие вопросы: