czwartek, 15 października 2015

Takie zadania

<html>
 <head>
<script>

function powitanie(imie){
imie=prompt("podaj swoje imie");
if(imie==null  || imie==""){
document.write("czemu nie podales imienia?");
}
else{

document.write("milo cie poznac"+imie+"!");}
}

function pozegnanie(imie){
if(imie != "brak" ) {
document.write("milo" +imie+ "ze nas odwiedziles");
}
else{
document.write("do widzenia");
}
return imie;

}



</script>

</head>
<body onLoad="powitanie(imie)"; onunLoad="pozegnanie(imie)" >
<script>

var imie=podaj_imie();



</script>
</body>
</html>



//////////////////////////////////////////////////////////////////////////////////////////



<html>
<head>
</head>
<body>
<p onmouseover="alert('This is tykst!')" > Moja strona </p>
</body>
</html>


 


////////////


<html>
<head>
</head>

<body>

<a href="http://wwww.wp.pl"onClick="window.close()"> Zamknij okno </a>

</body>

</html>




////////


<html>
<head>

<script>
function zdarzenie(){
window.location.href="http://www.wp.pl";}



</script>

</head>


<body>

<form>

<button name="Przycisk" value="przekierowanie" type="button" onClick="zdarzenie()">Przykierownie</button>

</form>


</body>

</html> 



/////////


<html>
<head>

<script>
function zdarzenie(){
if (confirm("Czy na pewno chcesz tam wyjsc?"))
window.location.href="http://www.wp.pl";}



</script>

</head>


<body>

<form>

<button name="Przycisk" value="przekierowanie" type="button" onClick="zdarzenie()">Lokno konfirm</button>

</form>


</body>

</html>








Brak komentarzy:

Prześlij komentarz