Код:

<html id="SampleAppHTML">
<head>
<meta charset="windows-1251">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Content-Language" content="ru">
<title>Sample HTML Application</title>
<HTA:APPLICATION
APPLICATIONNAME="My HTML Application"
ID="MyHTMLApplication"
VERSION="1.0"
/>
<hta:Application
Icon = "%SystemRoot%\System32\notepad.exe"
Id="idSampleHTA"
ApplicationName="Sample HTML Application"
Border="normal"
BorderStyle="normal"
Caption="yes"
ContextMenu="no"
InnerBorder="yes"
MaximizeButton="no"
MinimizeButton="yes"
Navigable="no"
Scroll="auto"
ScrollFlat="no"
Selection="no"
ShowInTaskbar="yes"
SingleInstance="yes"
SysMenu="yes"
Version="0.1 RC1"
WindowState="normal"
/>
<style type="text/css">
BODY {
font: x-small Verdana, Arial, sans-serif;
color: WindowText;
background-color: ButtonFace;
}
</style>
<script>
function DoIt_OnClick() {
if(Group01.item(0).checked) {
window.alert('Item 1 checked\r\nInput text: [' + txtField.value + ']')
} else {
if(Group01.item(1).checked) {
window.alert('Item 2 checked\r\nInput text: [' + txtField.value + ']')
} else {
window.alert('Nothing checked\r\nInput text: [' + txtField.value + ']')
}
}
}
</script>
</head>
<body id="tagBody" scroll="auto">
<input type="radio" name="Group01" value="Value01">Variant01<br>
<input type="radio" name="Group01" value="Value02">Variant02<br>
<input type="text" name="txtField" value="Default text" size="40">
<input type="Button" name="DoIt" value="DoIt" onclick="DoIt_OnClick()">
</body>
<script>
with(window) {
resizeTo(tagBody.scrollWidth + 25, tagBody.scrollHeight + 32)
moveTo((screen.availWidth - tagBody.offsetWidth) / 2, (screen.availHeight - tagBody.offsetHeight) / 2)
}
</script>
</html>