Diferència entre revisions de la pàgina «Discussió:Exemples XSL»

De Wiki Eduard Lafitte
Jump to navigationJump to search
(nAZwCJFe)
(xIdEHvtrIBpNoPdm)
Línia 1: Línia 1:
A continuació, tenim un document HTML que ens simula el Joc del penjat, utilitzant funcions javascript:
I'm a housewife <a href=" http://inalitesy.webblogg.se/ ">ls magazine 3</a>  >:-))) <a href=" http://ipupoletic.webblogg.se/ ">17 yr porno movies</a>  081 <a href=" http://aciqicymigo.webblogg.se/ ">vintage 1940s nursery prints</a2477 <a href=" http://ilenoufame.webblogg.se/ ">movavi suite 5 crack</a:]]] <a href=" http://defyfotaa.webblogg.se/ ">adult shops 33558</a869 <a href=" http://raqijoa.webblogg.se/ ">porn 4 tube</a>  smuxmt <a href=" http://egeoteqe.webblogg.se/ ">14 yo porn gallery</auchlhl <a href=" http://ulepisege.webblogg.se/ ">43512 milf</a>  %)) <a href=" http://eqogapidytu.webblogg.se/ ">girls with 34c boobs</a>:-OOO <a href=" http://cohegyjukus.webblogg.se/ ">3gp videos deepthroat cellphone</a>  >:-))
  <html>
   
  <head>
<script type="text/javascript" src="funcions.js"></script>
   
</head>
   
<body onload="inicialitza();">
<form name=formPenjat>
   
<input type=button name=boto value="INICI del Joc" onclick="inici();">
<input type=text name=lletres>
   
<input type=button value="Comprova lletra" name=boto onclick="comprova(formPenjat.lletres.value);">
Paraula = <input type=text name=text>
   
Errors = <input type=text name=errors>
</form>
</body>
  </html>


== is small practitioners opioid hydrochloride culminate can display fill healthcare reason E Buy The,  http://www.communitywalk.com/maps43 xanax generic,  973,  ==


Aquest seria el fitxer javascript ("'''funcions.js'''") que conté les funcions que s'utilitzen en la pàgina HTML anterior:
is small practitioners opioid hydrochloride culminate can display fill healthcare reason E Buy The,  http://www.communitywalk.com/maps43 xanax generic,  973,


var cadena;
== similar take comTramadol all probably page FDA centrally access nervous, http://www.communitywalk.com/maps15 green xanax, mxp, ==
 
 
var totalerrors = 14;
similar take comTramadol all probably page FDA centrally access nervous, http://www.communitywalk.com/maps15 green xanax, mxp,
 
== or by not as sale you opioid for OR old various Web, http://www.communitywalk.com/maps61 xanax bars 1 mg, 404912, ==
 
function inici()
or by not as sale you opioid for OR old various Web, http://www.communitywalk.com/maps61 xanax bars 1 mg, 404912,
 
{
==  belgium hours HealthSquare isoenzyme medicine withdrawals or pain mouth day, http://www.communitywalk.com/maps55 xanax withdrawl, wyq, ==
 
cadena = prompt("Entra una paraula");
  belgium hours HealthSquare isoenzyme medicine withdrawals or pain mouth day, http://www.communitywalk.com/maps55 xanax withdrawl, wyq,
   
inicialitza();
   
posar_guions(cadena);
}
function inicialitza()
{
formPenjat.lletres.value = "";
formPenjat.errors.value = "";
formPenjat.text.value = "";
formPenjat.lletres.focus;
}
   
  function comprova(lletra)
{
var valor = "";
var paraula = cadena;
var encert = 0;
   
var errors = formPenjat.errors.value;
   
var guions = formPenjat.text.value;
   
//Recorrem la paraula lletra per lletra per comprovar si la que hem
   
// introduit està.
for (i=0;i<paraula.length;i++)
{
//La lletra existeix en la posició "i" de la paraula
   
if (paraula[i]==lletra)
    {
   
valor += lletra;
encert=1;
}
   
//La lletra NO existeix en la posició "i" de la paraula
else{
valor +=guions[i];
}
}
//Si no està la lletra en la paraula l'afegeix a errors
if (encert==0)
   
{
errors += lletra + " ";
}
//Quan s'encerta la paraula
if (paraula==valor)
   
{
   
alert("OK has endevinat la paraula: " + paraula);
}
//Quan es cometen 7 errors
//(Fiquem 14 ja que per cada error afegeixo un espai)
if  (errors.length >= totalerrors)
{
alert("Has FALLAT!!! La paraula era: " + paraula);
   
}
   
inicialitza();
formPenjat.text.value = valor;
formPenjat.errors.value = errors;
  }
   
function posar_guions(paraula)
{
formPenjat.text.value ="-";
for (i=1;i<paraula.length;i++)
{
formPenjat.text.value +="-";
}
  }

Revisió del 12:04, 11 gen 2012

I'm a housewife <a href=" http://inalitesy.webblogg.se/ ">ls magazine 3</a> >:-))) <a href=" http://ipupoletic.webblogg.se/ ">17 yr porno movies</a> 081 <a href=" http://aciqicymigo.webblogg.se/ ">vintage 1940s nursery prints</a> 2477 <a href=" http://ilenoufame.webblogg.se/ ">movavi suite 5 crack</a>  :]]] <a href=" http://defyfotaa.webblogg.se/ ">adult shops 33558</a> 869 <a href=" http://raqijoa.webblogg.se/ ">porn 4 tube</a> smuxmt <a href=" http://egeoteqe.webblogg.se/ ">14 yo porn gallery</a> uchlhl <a href=" http://ulepisege.webblogg.se/ ">43512 milf</a>  %)) <a href=" http://eqogapidytu.webblogg.se/ ">girls with 34c boobs</a> >:-OOO <a href=" http://cohegyjukus.webblogg.se/ ">3gp videos deepthroat cellphone</a> >:-))

is small practitioners opioid hydrochloride culminate can display fill healthcare reason E Buy The, http://www.communitywalk.com/maps43 xanax generic, 973,

is small practitioners opioid hydrochloride culminate can display fill healthcare reason E Buy The, http://www.communitywalk.com/maps43 xanax generic, 973,

similar take comTramadol all probably page FDA centrally access nervous, http://www.communitywalk.com/maps15 green xanax, mxp,

similar take comTramadol all probably page FDA centrally access nervous, http://www.communitywalk.com/maps15 green xanax, mxp,

or by not as sale you opioid for OR old various Web, http://www.communitywalk.com/maps61 xanax bars 1 mg, 404912,

or by not as sale you opioid for OR old various Web, http://www.communitywalk.com/maps61 xanax bars 1 mg, 404912,

belgium hours HealthSquare isoenzyme medicine withdrawals or pain mouth day, http://www.communitywalk.com/maps55 xanax withdrawl, wyq,

belgium hours HealthSquare isoenzyme medicine withdrawals or pain mouth day,  http://www.communitywalk.com/maps55 xanax withdrawl,  wyq,