When debugging the code, I encountered a problem, the HTML element title usually only display a line, then I want him to change line, that is, multi-line display, how to implement? JS code inside such as alert inside and how to change the line?
After my experiment,
There are several ways to achieve this effect, and it is very simple:
In HTML elements, you can use:1. Press "enter" to wrap the line, the code is wrapped, and the actual line will be wrapped
2. Use the code to line up, just enter the two "& #10 where you want to break the line;" and "& #13;" Any one of them achieves the effect of line wrapping!
In the JS code, you want to wrap the contents of a popup box like a hint box, warning box, by using the escape character directly .
For example: "\ n" carriage return; "\ t" equals "tab"; "\ r" line break;
Effect
Welcome reprint, Ly Inn-Kang Jianjun-Blog: HTML element title inside and JS inside a few words how to change the line format code is how? , reproduced please specify the original website: http://blog.lykezhan.com/jishu/biji/2017/0314/222.html
HTML element title inside and JS inside a few words how to change the line format code is how?