Giter Club home page Giter Club logo

web-programer's Introduction

web-programer

creating form the get input from user and them show them in the same page

web-programer's People

Contributors

1shkelzeni avatar

Watchers

James Cloos avatar

web-programer's Issues

web programming

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>

<title> Form</title> <script>
        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>





Back

	</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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.