jquery里面怎么alert
jquery里面怎么alert
引入了jQuery.js之后在<script> </script>里面的任何位置都可以直接alert() 看你需要怎么使用了
给个例子 获取div的高度
<body>   
<div id="myDiv" >这是一个div</div>
<script>
alert("123")
$(function(){
alert("123")
$("#myDiv").click(function(){
var height = $("#myDiv").height()
alert(height)
})
})
</script>
<style>
#myDiv{
width: 100px
height: 100px
border: solid 1px black
}
</style>
</body>