2009 205: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
Write your javascript in a separate file, and name it "a.js" if your key is the a key.
<source lang="php">
<source lang="php">
<html>
<html>

Revision as of 14:16, 17 February 2009

Write your javascript in a separate file, and name it "a.js" if your key is the a key.

<html>
<head>
<style type="text/css">
p { color: blue; font-size: 18px }
p.first { color: black; font-size: 24px; background: pink }
</style>
<script type="text/javascript" src="jquery.js"> </script>
</head>

<body>

<p class="first">
The <span style="color: red; font-size: 64px">Khmer Rouge</span> (Red Khmer) was the communist ruling political party of Cambodia  which it renamed the Democratic Kampuchea  from 1975 to 1979. Gradually losing power following a <span id="invasion">Vietnamese invasion in December 1978</span>, the Khmer Rouge maintained control in some regions until 1998 when their final stronghold, in Anlong Veng District, fell to the government.[1]
</p>

<p>
The term "Khmer Rouge," French for "Red Khmer", was coined by Cambodian head of state Norodom Sihanouk and was later adopted by English speakers. It was used to refer to a succession of Communist parties in Cambodia which evolved into the Communist Party of Kampuchea (CPK) and later the Party of Democratic Kampuchea. The organization was also known as the Khmer Communist Party and the National Army of Democratic Kampuchea.
</p>

<p>
The Khmer Rouge is remembered mainly for the many deaths of an estimated 1.5 million people or 1/5 of the country's total population[citation needed] (estimates range from 850,000 to two million) under its regime, through execution, torture, starvation and forced labor. Following their leader Pol Pot, the Khmer Rouge imposed an extreme form of social engineering on Cambodian society  a radical form of agrarian communism where the whole population had to work in collective farms or forced labor projects. In terms of the number of people killed as a proportion of the population (est. 7.5 million people, as of 1975), it was one of the most lethal regimes of the 20th century.[citation needed]
</p>

<script type="text/javascript">

var isblack = false;

function blacken (event) {
  // console.log(event.keyCode); 
  if (event.keyCode == 66) {
    if (isblack) {
      $("p").css("background", "white");
      isblack = false;
    } else {
      $("p").css("background", "black")
      isblack = true;
    }
  }
}

// function whiten () {
//   $("p").css("background", "white").show()
// }

$(window).keydown(blacken);
// $(window).keyup(whiten)


</script>

</body>
</html>