ShadowEditor/ShadowEditor.Web/test/ui/07 ButtonTest.html
2018-08-01 21:34:58 +08:00

45 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>Button Test</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link href="../../assets/css/main.css" rel="stylesheet" />
<style>
.red {
color: red;
}
</style>
</head>
<body>
<script src="../../node_modules/three/build/three.js"></script>
<script src="../../dist/ShadowEditor.js"></script>
<script>
var control = Shadow.UI.create({
xtype: 'div',
children: [{
xtype: 'button',
id: 'button1',
cls: 'red',
text: 'Button 1',
title: 'This is button 1.',
onClick: function () {
UI.msg('You clicked button 1.');
}
}, {
xtype: 'button',
style: {
color: 'green'
},
text: 'Button 2'
}]
});
control.render();
</script>
</body>
</html>