有一段语句:
<textarea cols="50" rows="10" onmousedown="this.value+='\r\n'+event.type"
onmouseup="this.value+='\r\n'+event.type"
onmouseover="this.value+='\r\n'+event.type"
onmouseout="this.value+='\r\n'+event.type"
onkeydown="this.value+='\r\n'+event.type"
onkeyup="this.value+='\r\n'+event.type"
onkeypress="this.value+='\r\n'+event.type"
>
</textarea>请问这里面的this.value+='\r\n'起什么作用啊,为什么这么写
<textarea cols="50" rows="10" onmousedown="this.value+='\r\n'+event.type"
onmouseup="this.value+='\r\n'+event.type"
onmouseover="this.value+='\r\n'+event.type"
onmouseout="this.value+='\r\n'+event.type"
onkeydown="this.value+='\r\n'+event.type"
onkeyup="this.value+='\r\n'+event.type"
onkeypress="this.value+='\r\n'+event.type"
>
</textarea>请问这里面的this.value+='\r\n'起什么作用啊,为什么这么写
字符串相加。
就跟
var s = 'str';
s += 'str';//s = strstr;
这个一样。