var str = "窗口左边距离:"+e.clientX+",窗口顶边距离:"+e.clientY;
str += "\n网页左边距离:"+e.pageX+",网页顶边距离:"+e.pageY;
str += "\n屏幕左边距离:"+e.screenX+",屏幕顶边距离:"+e.screenY;
str += "\n事件类型:"+e.type;
谢谢!
学习
Regarding JS, += connection string, why must we add str += in front to connect? -PHP Chinese website Q&A-About JS, += connection string, why must we add str += in front to connect? -PHP Chinese website Q&A
Let’s take a look and learn.
str +=字符串 等于 str =str+字符串 这两个语句是相等的
上面的意思是把字符串加在str后面,组成一个整体的字符串
Regarding JS, += connection string, why must we add str += in front to connect? -PHP Chinese website Q&A-About JS, += connection string, why must we add str += in front to connect? -PHP Chinese website Q&A
Let’s take a look and learn.
str +=字符串 等于 str =str+字符串 这两个语句是相等的
上面的意思是把字符串加在str后面,组成一个整体的字符串