开发者

Different Ways of creating Buttons in DOJO Framework

开发者 https://www.devze.com 2023-04-04 21:47 出处:网络
Hi ,i found these two waysfor creatingButton in DOJO Framework开发者_如何学Go <input id=\"cb\" dojotype=\"dijit.form.Button\" name=\"developer\" type=\"Button\" />

Hi , i found these two ways for creating Button in DOJO Framework开发者_如何学Go

<input id="cb" dojotype="dijit.form.Button" name="developer" type="Button" />

<button dojoType="Button" widgetId="helloButton" onClick="helloPressed();">Hello World!</button>

Please tell me if there is any difference between these two ways of creating buttons in DOJO ??


From Dojo's dijit.form.Button documentation, the difference is in the html tag underlying dojo's widget. Here <button> vs. <input type="button" />. Which to use? there is an interesting discussion about html button vs html input with type=button.

The main difference is that the second choice lets you write html content between tags.

0

精彩评论

暂无评论...
验证码 换一张
取 消