document .getElementById in java script ;-
by using this element we can get element from the current document base on the element id
<script>
function fun1()
{
var con =document .getElementById ("text")
alert(con.value)
var str =document .getElementById ("text2")value
alert(str);
}
</script>
<input type="text" id ="text1" ></br>
<input type="text" id ="text2"></br>
<input type="button" value=click " onclick ="fun1()">
by using this element we can get element from the current document base on the element id
<script>
function fun1()
{
var con =document .getElementById ("text")
alert(con.value)
var str =document .getElementById ("text2")value
alert(str);
}
</script>
<input type="text" id ="text1" ></br>
<input type="text" id ="text2"></br>
<input type="button" value=click " onclick ="fun1()">