Смекни!
smekni.com

Программирование на языке Java Script (стр. 2 из 2)

var monthNames = new Array("Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря");

var month = now.getMonth();

var monthName = monthNames[month];

var year = now.getYear();

if ( year < 1000 ) year += 1900;

var datestring = dayname + ', ' + now.getDate() + ' ' + monthName + ', ' + year;

document.write('<NOBR>&nbsp;' + datestring + '</NOBR>');}

<!-- время

var timerID = null

var timerRunning = false

function stopclock(){

if(timerRunning)

clearTimeout(timerID)

timerRunning = false}

function startclock(){

stopclock()

showtime()}

function showtime(){

var now = new Date()

var hours = now.getHours()

var minutes = now.getMinutes()

var seconds = now.getSeconds()

var timeValue = "" + ((hours > 12) ? hours - 12 : hours)

var timeValue1 = "" + ((hours < 10) ? "0" : "") + hours

timeValue += ((minutes < 10) ? ":0" : ":") + minutes

timeValue1 += ((minutes < 10) ? ":0" : ":") + minutes

timeValue += ((seconds < 10) ? ":0" : ":") + seconds

timeValue1 += ((seconds < 10) ? ":0" : ":") + seconds

timeValue += (hours >= 12) ? " P.M." : " A.M."

document.f.face.value = timeValue

document.f.face.value = timeValue1;

timerID = setTimeout("showtime()",1000)

timerRunning = true}

</script>

<body bgcolor="#FFFFFF" onLoad="startclock(); nedel();">

<form name="f" method="post" action="" >

<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="1" height="1"> </td>

<td width="1" bgcolor="#000000"> </td>

<td bgcolor="#000000"> </td>

<td width="1" bgcolor="#000000"> </td>

<td width="1"> </td>

</tr>

<tr>

<td height="14"></td>

<td bgcolor="#000000"></td>

<td height="10" valign="middle" bgcolor="#999999" class="txtzagalovka">

&nbsp; :: расписание группы ИС-412</td>

<td bgcolor="#000000"></td>

<td bgcolor="#999999"></td>

</tr>

<tr>

<td height="1"></td>

<td bgcolor="#000000"></td>

<td bgcolor="#000000"> </td>

<td bgcolor="#000000"></td>

<td bgcolor="#999999"></td>

</tr>

<tr>

<td> </td>

<td bgcolor="#000000"> </td>

<td align="center" valign="top" bgcolor="#F5F5F5"> <table width="100%" border="0" cellpadding="0" cellspacing="0">

<tr>

<td height="1" align="center" valign="middle"> <input name="help" type="text" class="txthelp" id="help">

</td>

</tr>

</table>

<table width="100%" border="0">

<tr>

<td height="50">&nbsp;</td>

<td width="300"><table width="300" height="50" border="0" cellpadding="0" cellspacing="0">

<tr>

<td width="1" height="1" bgcolor="#000000"></td>

<td bgcolor="#000000"></td>

<td width="1" bgcolor="#000000"></td>

</tr>

<tr>

<td bgcolor="#000000"></td>

<td height="12" valign="top" bgcolor="#7195BD" class="txtnedel">&nbsp;&middot;

понедельник</td>

<td bgcolor="#000000"> </td>

</tr>

<tr>

<td height="1" bgcolor="#000000"> </td>

<td bgcolor="#000000"> </td>

<td bgcolor="#000000"> </td>

</tr>

<tr>

<td bgcolor="#000000"> </td>

<td valign="top" nowrap bgcolor="#DEEBF9"> <table width="100%" cellpadding="0" cellspacing="0" class="txtraspisan" title="Времяокончанияпары.">

<tr>

<td width="10" align="center" bgcolor="#F4F9FD" title="Номерпары.">&nbsp;1.&nbsp;</td>

<td width="1" align="center" bgcolor="#F4F9FD"> </td>

<td width="30" align="center" valign="top" bgcolor="#EAF2FB" class="txtraspisanADD" id=aud title="Аудитория.">125</td>

<td width="2" align="center" bgcolor="#F4F9FD"> </td>

<td valign="top" bgcolor="#F4F9FD" onMouseOver="javascript:this.style.color='#FF0000';document.f.help.value=a[11];" onMouseOut="javascript:this.style.color='#000000';document.f.help.value='';" title="Названиепредмета."><script >if (ned==1){document.write(a[11]);}else{document.write(a2[11])}</script>

</td>

<td width="1" valign="top" bgcolor="#F4F9FD"> </td>

<td id=audv width="50" align="center" bgcolor="#EAF2FB" class="txtraspisanADD" title="Времяначалапары.">8:30</td>

<td width="1" align="center" bgcolor="#EAF2FB" class="txtraspisanADD" id=audv>-</td>

<td id=audv width="50" align="center" bgcolor="#EAF2FB" class="txtraspisanADD" title="Времяокончанияпары.">9:50</td>

</tr>

<tr>

<td height="1" align="center" bgcolor="#F4F9FD"> </td>

<td align="center" bgcolor="#F4F9FD"></td>

<td align="center" valign="top" bgcolor="#F4F9FD" class="txtraspisanADD" id=aud></td>

<td align="center" bgcolor="#F4F9FD"></td>

<td valign="top" bgcolor="#F4F9FD"> </td>

<td valign="top" bgcolor="#F4F9FD"></td>

<td id=aud align="center" bgcolor="#F4F9FD" class="txtraspisanADD">

</td>

<td id=aud align="center" bgcolor="#F4F9FD" class="txtraspisanADD">

</td>

<td id=aud align="center" bgcolor="#F4F9FD" class="txtraspisanADD">

</td>

</tr>

<td align="center" title="Номерпары.">6. </td>

<td align="center" bgcolor="#F4F9FD"> </td>

<td align="center" valign="top" class="txtraspisanADD" id=aud title="Аудитория.">&nbsp;</td>

<td align="center" bgcolor="#F4F9FD"> </td>

<td valign="top" bgcolor="#D6E6F8" onMouseOver="javascript:this.style.color='#FF0000';document.f.help.value=a[36];" onMouseOut="javascript:this.style.color='#000000';document.f.help.value='';" title="Названиепредмета."><script >if (ned==1){document.write(a[36]);}else{document.write(a2[36])}</script></td>

<td valign="top" bgcolor="#F4F9FD"> </td>

<td id=audv align="center" bgcolor="#DEEBF9" class="txtraspisanADD" title="Времяначалапары.">16:30</td>

<td id=audv align="center" bgcolor="#DEEBF9" class="txtraspisanADD">-</td>

<td id=audv align="center" bgcolor="#DEEBF9" class="txtraspisanADD" title="Времяокончанияпары.">17:50</td>

</tr>

</table></td>

<td bgcolor="#000000"> </td>

</tr>

<tr>

<td height="1" bgcolor="#000000"> </td>

<td bgcolor="#000000"></td>

<td bgcolor="#000000"> </td>

</tr>

</table></td>

<td>&nbsp;</td>

<td><table width="300" height="50" border="0" cellpadding="0" cellspacing="0">

<tr>

<td width="1" height="1" bgcolor="#000000"></td>

<td bgcolor="#000000"></td>

<td width="1" bgcolor="#000000"></td>

</tr>

<tr>

<td bgcolor="#000000"></td>

<td height="12" valign="top" bgcolor="#009999" class="txtnedel">&nbsp;&middot;

настройки </td>

<td bgcolor="#000000"> </td>

</tr>

<tr>

<td height="1" bgcolor="#000000"> </td>

<td bgcolor="#000000"> </td>

<td bgcolor="#000000"> </td>

</tr>

<tr>

<td bgcolor="#000000"> </td>

<td align="center" valign="top" nowrap bgcolor="#C1E8D6" class="bgopton"><table width="100%" border="0" cellpadding="1" cellspacing="1">

<tr>

<td width="1" align="left" valign="middle"> <input type="checkbox" name="checkbox1" value="checkbox" onClick="ch1();" >

</td>

<td width="91%" class="txtraspisan">скрытьаудитории </td>

</tr>

<tr>

<td align="left" valign="middle"> <input type="checkbox" name="checkbox2" value="checkbox" onClick="ch2();"></td>

<td class="txtraspisan">скрытьвремязанятий</td>

</tr>

<tr>

<td align="left" valign="middle"> <input type="checkbox" name="checkbox3" value="checkbox" onClick="ch3();"></td>

<td class="txtraspisan">не выводить дополнительную информацию</td>

</tr>

</table></td>

<td bgcolor="#000000"> </td>

</tr>

<tr>

<td height="1" bgcolor="#000000"> </td>

<td bgcolor="#000000"></td>

<td bgcolor="#000000"> </td>

</tr>

</table></td>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td></td>

<td>&nbsp;</td>

</table>

</div>

</layer>

</form>

</body>

</html>

Страница “Сессия”

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<script Language="Javascript">

</script>

<body bgcolor="#FFFFFF" >

<form name="f" method="post" action="" >

<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td bgcolor="#000000"> </td>

<td bgcolor="#4673BD" class="txtzagalovka"> &nbsp;экзамены</td>

<td bgcolor="#000000"> </td>

</tr>

<tr bgcolor="#000000">

<td height="1"> </td>

<td> </td>

<td> </td>

</tr>

<tr>

<td height="1" bgcolor="#000000"> </td>

<td class="txtraspisan">&nbsp;&nbsp;12.14.04 СПО (12:00)</td>

<td bgcolor="#000000"> </td>

</tr>

<tr bgcolor="#000000">

<td height="1"> </td>

<td class="txtraspisan"> </td>

<td> </td>

</tr>

<tr>

<td bgcolor="#000000"> </td>

<td class="txtraspisan">&nbsp;&nbsp;16.14.04 Сети (9:30)</td>

<td bgcolor="#000000"> </td>

</tr>

<tr bgcolor="#000000">

<td height="1"> </td>

<td> </td>

<td> </td>

</tr>

</table>

</td>

<td>&nbsp;</td>

<td align="center" valign="top">

<table width="200" border="0" cellpadding="0" cellspacing="0">

<tr bgcolor="#000000">

<td width="1" height="1" bgcolor="#000000"> </td>

<td> </td>

<td width="1"> </td>

</tr>

<tr>

<td bgcolor="#000000"> </td>

<td bgcolor="#4673BD" class="txtzagalovka"> &nbsp;зачеты</td>

<td bgcolor="#000000"> </td>

</tr>

<tr bgcolor="#000000">

<td height="1"> </td>

<td> </td>

<td> </td>

</tr>

<tr>

<td height="1" bgcolor="#000000"> </td>

<td class="txtraspisan">&nbsp;&nbsp;11.14.04 Технология ПО (10:00)</td>

<td bgcolor="#000000"> </td>

</tr>

<tr bgcolor="#000000">

<td height="1"> </td>

<td class="txtraspisan"> </td>

<td> </td>

</tr>

<tr>

<td bgcolor="#000000"> </td>

<td class="txtraspisan">&nbsp;&nbsp;15.14.04 Сети (10:30)</td>

<td bgcolor="#000000"> </td>

</tr>

<tr bgcolor="#000000">

<td height="1"> </td>

<td> </td>

<td> </td>

</tr>

<tr>

<td bgcolor="#000000"> </td>

<td class="txtraspisan">&nbsp;&nbsp;13.14.04 Графика(10:30)</td>

<td bgcolor="#000000"> </td>

</tr>

</table>

<p>&nbsp;</p>

</form>

</body>

</html>

Страница “Развлечения”

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

</head>

<body bgcolor="#FFFFFF" >

<form name="f" method="post" action="" >

<table width="100%" height="100%" border="0">

<tr>

<td> </td>

<td bgcolor="#000000"> </td>

<td align="center" valign="top"><img src="raz.jpg" width="651" height="231"></td>

<td bgcolor="#000000"> </td>

<td bgcolor="#999999"></td>

</tr>

</form>

</body>

</html>