document.getElementById ('gadget_url'). value = 'your value';
тоящее время я использую гаджет YUI. У меня также есть функция Javascript, чтобы проверить вывод, который приходит изdiv
что ЮИ рисует для меня
Event.on("addGadgetUrl", "click", function(){
/* line x ------>*/ var url = Dom.get("gadget_url").value;
if (url == "") {
error.innerHTML = "<p> error" /></p>";
} else {
/* line y ---> */
/* I need to add some code in here to set the value of "gadget_url" by "" */
}
}, null, true);
Вот мойdiv
:
<div>
<p>URL</p>
<input type="text" name="gadget_url" id="gadget_url" style="width: 350px;" class="input"/>
<input type="button" id="addGadgetUrl" value="add gadget"/>
<br>
<span id="error"></span>
</div>
Как вы можете видеть мой вопрос, как я могу установить значениеgadget_url
быть""
?