- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Hi all,
I have a javascript function in which I want to set the href of a sprite button. Nothing seems to work. I have tried
- document.getElementById('button').href
- document.getElementById('button').src
with jQuery via setAttribute..
Anyone who can tell me what I should do to set the href of a sprite button?
Thanks
- Теги:
- HTML5
- Intel® XDK
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
If it is the "Sprite Button" from App Designer, just register a click handler on it.
In the Interactivity pane in App Designer find your button and in the right column choose "Custom Script". Then click the "Edit Script" button - that'll add a handler for you and you can just put whatever code you want in there.
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
What type of element is 'button'? The HTML href attribute can only be added to a HTML <a> tag.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
If it is the "Sprite Button" from App Designer, just register a click handler on it.
In the Interactivity pane in App Designer find your button and in the right column choose "Custom Script". Then click the "Edit Script" button - that'll add a handler for you and you can just put whatever code you want in there.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Where are you attempting to go ? To another file? To a #section on the page?
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
I have registered a click handler for it.
document.getElementById('button').onclick = (function(value){ code... });
This did the trick
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати