Имя пользователя:
Пароль:
 

Название темы: [решено] форма ввода
Показать сообщение отдельно

Ветеран


Сообщения: 27449
Благодарности: 8088

Профиль | Отправить PM | Цитировать


Цитата angel_lyucifer:
Мне нужна простая форма ввода на Hta »
Держите:
читать дальше »
Код: Выделить весь код
<html id="appHTML">
	<head>
		<meta charset="windows-1251">
		<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
		<meta http-equiv="Content-Language" content="ru">
		<title>Логин и пароль</title>
		<hta:Application
			Icon = "%SystemRoot%\system32\certutil.exe"
			Id="oHTA"
			ApplicationName="Логин и пароль"
			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 beta"
			WindowState="normal"
		/>
		<style type="text/css">
			BODY {
				font: x-small Verdana, Arial, sans-serif;
				color: WindowText;
				background-color: ButtonFace;
			}
			.Row{
				clear:both;
			}
			.Left{
				float:Left;
				clear:none;
			}
			.Right{
				float:Right;
				clear:none;
			}
		</style>
		
		<script language="VBScript">
			Option Explicit
			
			Sub Window_OnLoad
				With window
					.resizeTo tagBody.scrollWidth \ 2 + 25, tagBody.scrollHeight + 32
					.moveTo (.screen.availWidth - tagBody.offsetWidth ) \ 2, (.screen.availHeight - tagBody.offsetHeight) \ 2
				End With
			End Sub
			
			Sub OnClickButtonOK()
				Const TristateTrue = -1
				
				With CreateObject("Scripting.FileSystemObject")
					With .CreateTextFile("E:\Песочница\0283\Data.txt", True, TristateTrue)
						.WriteLine Login.value
						.WriteLine Password.value
						
						.Close
					End With
				End With
				
				window.close()
			End Sub
			
			Sub OnClickButtonCancel()
				window.close()
			End Sub
		</script>
	</head>
	<body id="tagBody" scroll="auto">
		<span Class="Row">
			<span Class="left"><span id="lblLogin">Логин: </span></span>
			<span Class="right"><input type="text" name="Login" id="Login" value="" size="30"></span>
		</span>
		<span Class="Row">
			<span Class="left"><span id="lblPassword">Пароль: </span></span>
			<span Class="right"><input type="password" name="Password" id="Password" value="" size="40"></span>
		</span>
		<hr Class="Row" />
		<span Class="Row">
			<span Class="left"></span>
			<span Class="right">
				<input type="button" name="OK" id="OK" value="Запомнить" onclick="OnClickButtonOK">
				<input type="button" name="Cancel" id="Cancel" value="Cancel" onclick="OnClickButtonCancel">
			</span>
		</span>
	</body>
</html>
Это сообщение посчитали полезным следующие участники:

Отправлено: 07:18, 24-06-2013 | #2

Название темы: [решено] форма ввода