Last active
August 29, 2015 14:14
-
-
Save appikonda/807958083fc36d97ef35 to your computer and use it in GitHub Desktop.
Mohnish Assignment #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<titl>Assignment #5</titl> | |
</head> | |
<body> | |
<div>Input#1: <input type="text" id="one" value="" oninput="swapInput1()" /></div> | |
<div>Input#2: <input type="text" id="two" value="" oninput="swapInput2()" /></div> | |
<script> | |
// Explanation: https://www.youtube.com/watch?v=-74grOUO-dg&feature=youtu.be | |
// When you enter any text in Input#1, | |
// it should immediately appear inside | |
// Input#2 and Vice versa. This should | |
// as you type. | |
// Implement your solution here. | |
function swapInput1(){ | |
var input = document.getElementById("one").value; | |
document.getElementById("two").value= input; | |
} | |
function swapInput2(){ | |
var input = document.getElementById("two").value; | |
document.getElementById("one").value= input; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment