示例代码:

import win.ui;
/*DSG{{*/
var winform = ..win.form( bottom=399;parent=...;right=599;text="HTMLayout 文本框" )
winform.add( )
/*}}*/

import web.layout;
var wbLayout = web.layout(winform)

import web.layout.debug;
wbLayout.attachEventHandler( web.layout.debug );
wbLayout.html = /**
<html>
<head>
<style>
input[type="text"]
{
background-image:url(data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAC0AAAAXCAYAAACf+8ZRAAAACXBIWXMAAA7DAAAO
wwHHb6hkAAAA5UlEQVR4nGNkAAGn/9LKEn/mCvP95WIYpODtJ+Zvd1+wJDPsY3zK
yGD3X1FX+dfBja3vZBUl/w6023CC+8+ZGfyrhR5ffshmyaga+2fznp7XPnJig9fB
MAByuGuJyE4mXo6/SkPBwSAASgmCvP+lmdjZBtoppAFWlv9MTAPtCHLAqKPpBUYd
TS8w6mh6gVFH0wuMOppeYNTR9AJD09G//zD+G2hHkAJA7mV6/5nxKahHMBQAyJ0g
9zKBOougvtdgdzisjwhyLyNYBNoblxb9J8TN8Z9ngN2HAb7+YPzy9DXTO1hvHABp
3VAYxhOqkwAAAABJRU5ErkJggg==);
background-repeat:expand; /*九宫格切图*/
background-position: 5 5 5 5; /*上,右,下,左各5个像素固定边距*/
}

/*输入框得到焦点的样式*/
input[type="text"]:focus
{
outline:4px glow #3070ff 1px;
}

/*输入框为空的样式*/
input[type="text"]:empty{
color:#CCCCCC;
}

</style>
<head>
<body>
<p>
用户名: <input type="text" id="用户名" novalue ="请输入用户名"/>
密码: <input type="text" id="密码" novalue="请输入用密码"/>
<button id="登录"> 登 录 </button>
</p>
</body>
</html>
**/

wbLayout.onButtonClick = function (ltTarget,ltEle,reason,behaviorParams) {
if( ltEle.id == "登录" ){
winform.msgbox("欢迎:" + wbLayout.getEle("用户名").value )
}
}

winform.show()
win.loopMessage();