<script>
function getType() {
var o="123";
var i = 1;
var _t;
_t = ((_t = typeof(o)) == "object" ? Object.prototype.toString.call(o).slice(8,-1):_t).toLowerCase();
alert(_t);
_t = ((_t = typeof(i)) == "object" ? Object.prototype.toString.call(i).slice(8,-1):_t).toLowerCase();
alert(_t);
}
</script>
<input type="button" οnclick="getType()" value="click me !">