我想打印任何对象。我希望你明白,我想要什么。我是新的。下面是我的代码,
function abhi(x)
{
var abhi = new Object();
abhi.first_name = "abhijit";
abhi.last_name = "Das";
abhi.age = 22;
document.getElementById("name").innerHTML = abhi.x ;
}
</script>
<p id="name"></p>
<input type="submit" name="submit" value="Name" onclick="abhi(age)"/>
</body>