The capital of France is <%=Capitals.Item("France")%><p>
<% var Country
Country = "Denmark" %>
Do we know anything about <%=Country%>?<br>
<% if(Capitals.Exists(Country)) {%> Yes, I know the capital of <%=Country%>.<p> It is <%=Capitals.Item(Country)%>.<p> <%} else {%> No I don't know anything about <%=Country%>.<p> <%}%>
But what do you actually know?<br> - I know that:<br>
<% for(Num = 0; Num < LastCountry; Num++) {%> The capital of <%=CountryList(Num)%> is <%=Capitals.Item(CountryList(Num))%>.<p> <%}%>
</html> - - - - -
Men det out-put jeg får er: - - - - - The capital of France is Paris Do we know anything about Denmark? No I don't know anything about Denmark.
But what do you actually know? - I know that: - - - - -
Hvorfor skriver den ikke det ud som for-løkken skulle gøre? (det skulle ikke være noget med ; efter sætningerne selvom det er god skik :o) )
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Prøv at gøre dette: CountryList = Capitals.Keys() LastCountry = Capitals.Count -1
Efter du har added til liste: Capitals.Add("England", "London") Capitals.Add("USA", "Washington") Capitals.Add("France", "Paris") Capitals.Add("Norway", "Oslo")
Jeg kan godt se hvad du mener! Men af en eller anden grund virker det stadig ikke! Denne gang kører scriptet slet ikke! Koden ser nu sådan ud: - - - - - <%@ LANGUAGE=JScript %>
<html>
<% var Capitals, CountryList, LastCountry, Num
Capitals = new ActiveXObject("Scripting.Dictionary")
The capital of France is <%=Capitals.Item("France")%><p>
<% var Country
Country = "Denmark" %>
Do we know anything about <%=Country%>?<br>
<% if(Capitals.Exists(Country)) {%> Yes, I know the capital of <%=Country%>.<p> It is <%=Capitals.Item(Country)%>.<p> <%} else {%> No I don't know anything about <%=Country%>.<p> <%}%>
But what do you actually know?<br> - I know that:<br>
<% for(Num = 0; Num < LastCountry; Num++) {%> The capital of <%=CountryList(Num)%> is <%=Capitals.Item(CountryList(Num))%>.<p> <%}%>
Det er nede i linierne: The capital of <%=CountryList(Num)%> is <%=Capitals.Item(CountryList(Num))%>.<p> at der er et problem! Jeg får flg fejl: Microsoft JScript runtime error '800a138a'
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.