creating form the get input from user and them show them in the same page
1shkelzeni / web-programer Goto Github PK
View Code? Open in Web Editor NEWcreating form the get input from user and them show them in the same page
creating form the get input from user and them show them in the same page
i wanna this code get the input from user and showing that in a text box...can you help me to find out what is wrong.
<!doctype html>
function getAndSetVal()
{
var txt1 = document.getElementById('txt1').value;
var txt2 = document.getElementById('txt2').value;
var txt3 = document.getElementById('txt3').value;
var txt4 = document.getElementById('txt4').value;
var txt5 = document.getElementById('txt5').value;
var txt6 = document.getElementById('txt6').value;
document.getElementById('txt8').value = txt1+txt2+txt3+txt4+txt5+txt6;
}
// get value
function getVal()
{
var txt = document.getElementById('txt1').value;
var txt = document.getElementById('txt2').value;
var txt = document.getElementById('txt3').value;
var txt = document.getElementById('txt4').value;
var txt = document.getElementById('txt5').value;
var txt = document.getElementById('txt6').value;
alert(txt);
}
</script>
<style>
body
{
margin: 0;
padding: 0;
background: url(f5.jpg);
background-size: cover;
font-family: sans-serif;
}
.loginBox
{
position: absolute;
top: 55%;
left: 50%;
transform: translate(-50%,-50%);
width: 350px;
height: 90%;
padding: 80px 40px;
box-sizing: border-box;
background: rgba(0,0,0,.5);
}
.user
{
width: 100px;
height: 100px;
border-radius: 50%;
overflow: hidden;
position: absolute;
top: calc(-100px/2);
left: calc(50% - 50px);
}
h2
{
margin: 0;
padding: 0 0 20px;
color: gold;
text-align: center;
}
.loginBox p
{
margin: 0;
padding: 0;
font-weight: bold;
color: #fff;
}
.loginBox input
{
width: 100%;
margin-bottom: 20px;
}
.loginBox input[type="text"],
.loginBox input[type="number"]
{
border: none;
border-bottom: 1px solid #fff;
background: transparent;
outline: none;
height: 15px;
color: #fff;
font-size: 16px;
}
::placeholder
{
color: rgba(255,255,255,.5);
}
.button
{
border: none;
outline: none;
height: 40px;
color: white;
font-size: 16px;
background: blue;
cursor: pointer;
border-radius: 20px;
}
.button:hover
{
background: #efed40;
color: #262626;
}
.loginBox a
{
color: #fff;
font-size: 14px;
font-weight: bold;
text-decoration: none;
}
//kodi back
.u1{
list-style-type: none;
margin: 1%;
padding: 0;
width: 20%;
height: 2%;
left:0%;
overflow: hidden;
padding-left:45%;
}
a {
display:inline;
color:black;
padding: 2% 4%;
text-decoration: none;
font-size: 80%;
text-align: left;
margin:10px;
}
a:hover{
background: rgba(0,0,0,.5);
color:yellow;
}
</style>
</nav>
</div>
<div class="loginBox">
<img src="user.png" class="user">
<h2>Vendosni te dhenat</h2>
<form>
<p>Emri</p>
<input type="text" name="" id="txt1" placeholder="Vendosni emrin" onclick="this.value = '' ">
<p>Mbiemri</p>
<input type="text" name="" id="txt2" placeholder="Vendosni Mbiemri" onclick="this.value = '' " >
<p>Mosha</p>
<input type="number" name="" id="txt3" placeholder="Vendosni Moshen" onclick="this.value = '' ">
<p>ID</p>
<input type="text" name="" id="txt4" placeholder="Vendosni ID" onclick="this.value = '' ">
<p>Vendlindja</p>
<input type="text" name="" id="txt5" placeholder="Vendosni Vendlindjen" onclick="this.value = '' ">
<p>Telefoni</p>
<input type="number" name="" id="txt6" placeholder="Vendosni numrin e telefonit" onclick="this.value = '' ">
<button class="button" onclick="getAndSetVal();">Merr te dhenat</button>
<p>Te Dhena qe ju futen jane:</p>
<input type="text" name="" id="txt6" onclick="this.value = '' ">
</form>
</div>
</body>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.