01.
<%@ Page Language=
"VB"
AutoEventWireup=
"false"
CodeFile=
"RadioButtonWithText.aspx.vb"
02.
Inherits
=
"RadioButtonWithText"
%>
03.
06.
<head runat=
"server"
>
07.
<title></title>
08.
<style>
09.
body
10.
{
11.
font-family: Tahoma, MS Sans Serif;
12.
font-size: 11px;
13.
color: DarkSlateBlue;
14.
}
15.
.EntryRow
16.
{
17.
background-color: lemonchiffon;
18.
text-align: left;
19.
}
20.
</style>
21.
</head>
22.
<body>
23.
<form id=
"form1"
runat=
"server"
>
24.
<div >
25.
<table border=
"0"
cellpadding=
"3"
cellspacing=
"0"
style=
" background-color : WhiteSmoke"
>
26.
<tr class=
"EntryRow"
>
27.
<td colspan=
"3"
>
28.
รายละเอียด
29.
</td>
30.
</tr>
31.
<tr>
32.
<td style=
"width: 100px; text-align: right;"
>
33.
รูปแบบการลา
34.
</td>
35.
<td style=
"width: 80px"
>
36.
<asp:RadioButton ID=
"RadioButtonDayLeave"
runat=
"server"
Text=
"ลาเต็มวัน"
GroupName=
"TakeLeave"
/>
37.
</td>
38.
<td >
39.
<asp:TextBox ID=
"TextBoxTotalDay"
runat=
"server"
Width =
"40px"
></asp:TextBox> วัน
40.
</td>
41.
</tr>
42.
<tr>
43.
<td style=
"width: 100px; text-align: right;"
>
44.
</td>
45.
<td style=
"width: 80px"
>
46.
<asp:RadioButton ID=
"RadioButtonHourLeave"
runat=
"server"
Text=
"ลาเป็นชม."
GroupName=
"TakeLeave"
/>
47.
</td>
48.
<td >
49.
<asp:TextBox ID=
"TextBoxTotalHour"
runat=
"server"
Width =
"40px"
></asp:TextBox> ชม.
50.
</td>
51.
</tr>
52.
</table>
53.
54.
55.
</div>
56.
<script type=
"text/javascript"
language =
"javascript"
>
57.
58.
function javascriptCheckedRadioButtonFormTextBox(argTextBox, argRadioButtonName) {
59.
var myRadioButton = document.getElementById(argRadioButtonName);
60.
if (myRadioButton == null) {
61.
return fasle;
62.
}
63.
myRadioButton.checked = true;
64.
return false;
65.
}
66.
67.
function javascriptCheckedRadioButtonFormTextBoxWithKeyPress(argTextBox, argRadioButtonName) {
68.
var myRadioButton = document.getElementById(argRadioButtonName);
69.
if (myRadioButton == null) {
70.
return fasle;
71.
}
72.
if (argTextBox.value.length > 0)
73.
myRadioButton.checked = true;
74.
return false;
75.
}
76.
77.
</script>
78.
79.
80.
</form>
81.
</body>
82.
</html>