Jump to content

dianzishangwu

Members
  • Posts

    4
  • Joined

  • Last visited

dianzishangwu's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. content removed...please post only web design related topics and post them in the forum, do not advertise your msn name and expect help
  2. check out this example:<html><body><script language="JavaScript" type="text/javascript">var degFahren=prompt("enter the degrees in Fahrenheit",50);var degCent;degCent=5/9*(degFahren-32);alert(degCent);</script></body></html>my question is why not use Number(prompt("enter the degrees in Fahrenheit",50));here cauze I think things within prompt are always strings..then we want to use the number so need to use number method to convert the string to actual number,this is an example from a text book..anyone has this kind of experience to share? when you use prompt and you may want to actual numbers, so do you often use Number method to transfer?cheers!
  3. exactly..thanks..but could you please show me how to do that?thanks
  4. I'm working on one task about making a website(well..not really a website cauze just client-side.that's just for practing javascript) as a world clock which means visitor a selection list of cities around the world. When the user selects a city, that cities current local time, monthly average temperature and monthly average rainfall are displayed. In order to encourage visitors to use their website as a type of world clock, I also need to provide a way to allow the visitor to set a city as their default city. When the visitor then returns to the Cities Around the World page, the visitor’s selected default city’s information will automatically be displayed. So I created three pages(index.html/ main.html/ top.html). The index.html page is a frameset page and I want to create five functions(function createCityInfo()/ function selectCity()/ function readDefaultCity()/ function writeDefaultCity()/ function setDefaultCity()/ ). The main page is one of the frame which contains all the data(Time Zones/ Average Temperature (°C)/ Average Rainfall (mm)) So I need to insert code to dynamically write the code based on selectd city in main.html page, thus I can retrieve data to show the visitor you know. And last page is the top.html which contains all the city names. So does anyone has this kind of javascript ability or experience to show me codes to achieve that goal. We can just talk about two cities at the moment..all I want to learn or know is the functions and other stuff. cheers
×
×
  • Create New...