Angular JS does this in two lines of code:
Just import Angular JS when importing other libraries:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js">
Then on the first div (where you copy):
<input type="text" ng-model="myID"> </input>
Then, in the place where you show the content: just write:
<div> {{myID}}</div>
This is the best solution I've ever found!
Sandip subedi
source share