hin_und_her1.php


Quell Code


<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body{
display:flex;
flex-direction:column;
}
 textarea{
 height:300px;
 width:80%;
 margin-left:10%;
 font-size:35px;
 }
 a{
 text-align:center;
 font-size:30px;
 margin-top:50px;
}
label{
text-align:center;
font-size:30px;
30px;
}
div{

display:flex;
}
span{
flex:1;
display:flex;
flex-direction:column;
}
#save{
width:500px;
margin-left:calc(50% - 250px);

height:35px;
font-size:25px;
}
p{
font-size:60px;
color:green;
text-align:center;
}

</style>
 <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
 </head>
<body>
<div>
<span><label> Textfeld1:</label><textarea type="text1" id="text1" value=""></textarea></span>
<span><label> Textfeld2:</label><textarea type="text2" id="text2" value=""></textarea></span>
</div>
<input type="button" id="save" value="Speichern und dann Link klicken"><span>
 <a href="/loesungen/hin_und_her2.php">Gehe hier auf den anderen Link</a>
 <p>Seite 1</p>
<script>

  if(localStorage.getItem('text11')==null){
localStorage.setItem('text11','Schreibe hier deinen Text rein der auf der anderen Seite landen soll'); 
  $('#text1').val(localStorage.getItem('text11'));
}else{
  $('#text1').val(localStorage.getItem('text11'));
}

  if(localStorage.getItem('text22')==null){
localStorage.setItem('text22','Schreibe hier deinen Text rein der auf der anderen Seite landen soll oder auch nicht'); 
  $('#text2').val(localStorage.getItem('text22'));
}else{
  $('#text2').val(localStorage.getItem('text22'));
}


$('#save').click(function(){
 text1=$('#text1').val();
  text2=$('#text2').val();
 localStorage.setItem('text11',text1); 
  localStorage.setItem('text22',text2); 
});
</script>
</body>
</html>


Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0