码迷,mamicode.com
首页 > 其他好文 > 详细

通过GZ代替document.getElementById()

时间:2017-12-28 15:04:12      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:快速   param   pre   class   blog   script   turn   gpo   doc   

/**
 * 作用:通过GZ代替document.getElementById(‘‘),达到快速简捷的作用
 * @param elementId 传入的ID名
 */
function GZ(elementId) {
	return document.getElementById(elementId);
}

  

通过GZ代替document.getElementById()

标签:快速   param   pre   class   blog   script   turn   gpo   doc   

原文地址:https://www.cnblogs.com/rockyan/p/8135626.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!