WebOS 3.0 Enyo 按钮 Onclick 事件
我认为这是一个简单的问题,但我被困住了......
现在我正在使用 WebOS 3.0 为 PalmPAD 开发 我想设计登录系统。
现在我想知道用户是否单击(在login.js页面中)单击事件上的注册按钮我需要
在文档中打开我的register.js页面我找到了这段代码
代码:
enyo.kind({
name: "MyApps.Sample",
kind: "enyo.VFlexBox",
style: "width: 400px; padding: 5px",
components: [
{kind: "CustomButton", caption: "unstyled (CustomButton)",
onclick: "buttonClick"},
{kind: "Button", caption: "styled (Button)", onclick: "buttonClick"}
],
buttonClick: function() {
// respond to click
}
});
在此buttonClick中:function()我应该写什么导航到 register.js 页面?
i think its an easy question but i am stuck ...
now i am developing for PalmPAD with WebOS 3.0
and i want to design login system in that.
now i want to know if user click on (in login.js page) Register Button on click event i need to open my register.js page
in doc i found this code
Code:
enyo.kind({
name: "MyApps.Sample",
kind: "enyo.VFlexBox",
style: "width: 400px; padding: 5px",
components: [
{kind: "CustomButton", caption: "unstyled (CustomButton)",
onclick: "buttonClick"},
{kind: "Button", caption: "styled (Button)", onclick: "buttonClick"}
],
buttonClick: function() {
// respond to click
}
});
in this buttonClick: function() what should i write to navigate to the register.js page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请遵循以下代码:
buttonClick: function() {
enyo.create({kind: "register"}).renderInto(document.body);
}
“register”种类是在register.js文件中创建的种类的名称,
例如:register.js
enyo.kind({
名称:“注册”,
种类:“enyo.VFlexBox”,
样式:“宽度:400px;填充:5px”,
成分: [
//添加任何你想要的组件
],
});
谢谢
follow this code:
buttonClick: function() {
enyo.create({kind: "register"}).renderInto(document.body);
}
"register" kind is name of the kind of created in register.js file
ex: register.js
enyo.kind({
name: "register",
kind: "enyo.VFlexBox",
style: "width: 400px; padding: 5px",
components: [
//add the components whatever you want
],
});
Thanks