这个 JS 脚本给了我一个警告框说;
jQuery.UI.version = 1.0.2 --- Box Width: undefined
我该如何选择#resizable
?
<head>
<title></title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.10.2.custom.min.js" type="text/javascript"></script>
<style>
#resizable { width: 200px; height: 150px; padding: 5px; border: 1px solid red;}
</style>
<script>
$(function () {
var boxWidth = $('#resizable').attr('width');
alert("jQuery.UI.version = " + jQuery.ui.version + " --- Box Width: " + boxWidth);
});
</script>
</head>
<body>
<div id="resizable" class=">
<div id="title">
<h2>
The expanding box
</h2>
</div>
</div>
</body>