![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
进击的码码码码N
每天学一天,头发少一点
展开
-
window.print
一.打印当前页面指定元素中的内容方式一:直接使用window.print();(1)首先获得元素的html内容(这里建议如果有样式最好是用内联样式的方式) var newstr = document.getElementById(myDiv).innerHTML;//得到需要打印的元素HTML(2)保存当前页面的整个html,因为window.print()打印操作是打印当前页的...转载 2019-07-04 17:30:50 · 465 阅读 · 0 评论 -
JavaScript基础
1.重新typeOf方法function myTypeof(a) {var type = typeof (a);var toStr = Object.prototype.toString;var tStr = {'[object Array]': 'Array','[object Object]': 'Object','[object Number]': 'Numbe...原创 2019-08-19 17:54:09 · 84 阅读 · 0 评论