Js if the object is then judged whether equal undefined undefined being given,
need to use
if(typeof(username)=='undefined')
If you define too, and can be used directly
if(username==undefined)
Note that the other determined
if(null==undefined) true
if(null===undefined) false
if(typeof null=="object") true