Пакет Adobe GoLive

         

Динамические стили



Листинг 7.4

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>

<1;11;1е>
Динамические стили</1:11:1е>

<style id="stylel" type="text/css">

hi {color:red}
p {font-family:"Courier New"}
</style>
<style id="style2" type="text/css">

hi {color:blue}
p {font-family:"Times New Roman"}
</style>

<script language="javascript">

function chan_style(x)
if (x==l) {stylel.disabled=true; style2.disabled=false}; if (x==2) {style2.disabled=true; stylel.disabled=false};
</script>

</head>
<body>

<р>
Первый стиль o<$opwieHHH<input type="radio" name="groupl' onClick="chan_style (1) " value="l" checkedx/p>

<р>
Второй стиль oфopмлeния<input type="radio" name="groupl'
onClick="chan_style (2) " value="2"x/p>

<п!>
3аголовок первого уровня</п!>

<р>
Пример обычной строки текста</р>

</body>

</html>

Содержание раздела