
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
06.02.2014, 09:02
|
|||
|---|---|---|---|
Number field вводить только цифры |
|||
|
#18+
Здравствуйте форумчане Подскажите как реализовать в APEX ввод item number field только числа, javascript есть, но в каком attribute item его прописать Пробовал в HTML form element attribute onkeypress="number_only(event);" number_only(event) { e = e || event; if (e.ctrlKey || e.altKey || e.metaKey) return; var chr = getChar(e); // с null надо осторожно в неравенствах, т.к. например null >= '0' => true! // на всякий случай лучше вынести проверку chr == null отдельно if (chr == null) return; if (chr < '0' || chr > '9') { return false; } } function getChar(event) { if (event.which == null) { if (event.keyCode < 32) return null; return String.fromCharCode(event.keyCode) // IE } if (event.which!=0 && event.charCode!=0) { if (event.which < 32) return null; return String.fromCharCode(event.which) // остальные } return null; // специальная клавиша } Все отрабатывает но все равно дает вводить в поле буквы Помогите ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
07.02.2014, 07:10
|
|||
|---|---|---|---|
|
|||
Number field вводить только цифры |
|||
|
#18+
Можно воспользоваться следующим plugin-ом Text Field with Masked Input http://apex-plugin.com/oracle-apex-plugins/item-plugin/text-field-with-masked-input_63.html ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
11.02.2014, 09:36
|
|||
|---|---|---|---|
Number field вводить только цифры |
|||
|
#18+
daaapd, Код: javascript 1. 2. 3. 4. 5. 6. 7. 8. 9. HTML Form Element Attributes Код: javascript 1. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=50&mobile=1&tid=1875413]: |
0ms |
get settings: |
11ms |
get forum list: |
19ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
80ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
53ms |
get tp. blocked users: |
2ms |
| others: | 243ms |
| total: | 427ms |

| 0 / 0 |
