jquery - jquery初始化控制台日志
问题描述
我怎样才能打印一些东西,例如。
console.log "inited"
当 jquery 在网页上下载并初始化自身时。
到目前为止我有
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
</html>
解决方案
使用函数检查加载( .ready() 的处理程序):
$(function() {
console.log( "Jquery Initilised.The DOM is now loaded and can be manipulated." );
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
推荐阅读
- excel - 查看多个日期是否在 Excel 中的日期范围内
- elasticsearch - ElasticSearch 6.0.1:.../_forcemerge API 不能随更多线程扩展(被限制?)
- graphics - 拼图的图形表示
- matlab - 如何使 3D 对象具有不同颜色的正面和背面
- typescript - 逆向控制器中的错误处理
- reactjs - 制作网站(地图、道具等新手东西)
- symfony - Symfony 4 自动装配 DataTransformerInterface
- cryptography - 矩阵哈希值的计算
- css - IE 和 Edge 忽略 svg 的绝对位置
- api - 倒数函数的cuda“舍入模式”