</script>
<style type="text/css">
input{width:100px;height:70px;color: red;background-color: azure;}
</style>
<script type="text/javascript">
$(function() {
$("input").click(function() {
alert($("input").attr("width","height"));
})
})
</script>
</head>
<body>
<input type="button" value="显示"/>
</body>
你需要看看官方文档。
attr的用法:
http://www.css88.com/jqapi-1.9/attr/
height:
http://www.css88.com/jqapi-1.9/height/
prop:
http://www.css88.com/jqapi-1.9/prop/