English 中文(简体)
文本字段的 Dojo 自动完成=on
原标题:Dojo autocomplete=on for textfields
  • 时间:2012-05-23 04:29:27
  •  标签:
  • dojo

我将应用程序从使用普通 html 文本字段改为 dijit 文本字段。 在添加 dojo 后, 文本字段不会在文本字段中显示先前输入的值, 只要我输入第一个字符, 这样我就不需要再输入文本了... 这是 dijit textfield 部件的默认行为 。 如何使文本字段自动完成 。 请帮助我 。 我尝试了下面在添加 On Load 方法中的语句, 但没有运气 。

dojo.attr(dijit.byId( username ).textbox, "autocomplete", "on");
问题回答

您如何声明您的文本字段?

<div id="form1" data-dojo-type="dijit.form.Form" method="post">
    <input data-dojo-type="dijit.form.TextBox" name="text" id="text" autocomplete="on"/>
    <input type="hidden" name="delay" value="2"/>
    <button data-dojo-type="dijit.form.Button" type="submit">Send</button>
</div>

http://jsfiddle.net/psoares/YZetB/"rel="nofollow">http://jsfiddle.net/psoares/YZetB/





相关问题
Get Dojo Radio Button Value?

I have an HTML form using dojo and have the following code for a radio button selection choice: dojo.require("dijit.form.RadioButton"); <link href="http://ajax.googleapis.com/ajax/libs/dojo/1....

is it possible to know if a dijit is displayed or not?

i have two divs on a page. each has several dijits. i have atoggle that shows only one div or the other. when i submit the form, i only want to validate the dijits that are in the div that is ...

dijit BorderContainer auto-grow

Is there a way to have a dijit.layout.BorderContainer auto-grow in height? I ve tried setting min-height: 200px; height: auto;, but it won t scale. I ve tried looking at the API, but that thing is a ...

Dojo Tabs as Custom Widgets

I ve created a number of widgets that are loaded as tab panes in a tabcontainer. Everything seems to work well, except I m getting different results when using my custom widgets vs. creating ...

What happened to Dojo DOH?

The Dojo Toolkit used to come with a testing facility called "Doh". It was in the /utils directory. Now when you download dojo-release-1.3.2 the /utils directory is nowhere to be found. Is Doh dead ...

热门标签