What We do Here?

  1. We included the following in the HTML-file: <BODY onLoad="{median()}"> So, the prompt-box pops up, the moment the loading is complete.
  2. The function median() is called the moment you complete your loading. So the function does it's job of poping up the prompt-box, read your annual income and alerts you if you are above or below median-income.
  3. The function median() is as follows <script language="JavaScript"> function medianB() { var incomeb=prompt("my annual incomeB is ", " "); if (incomeb < 37000) {alert("youB are below medianincome")} else {alert("youB are above medianincome")}; } </script>
  4. It works both with NETSCAPE and MS Internet Explorer.
  5. Remark: Often, you and I see all those "things" and commercials that appear the moment we visit a site. It is fairly annoying at times. Well, this must be the way they do it.