SyntaxFix
Write A Post
Hire A Developer
Questions
the OOP way to do this in ES5 is to make that variable into a property using the this keyword.
function first(){ this.nameContent=document.getElementById('full_name').value; } function second() { y=new first(); alert(y.nameContent); }