I want to dynamically add text-type data to TEXTAREA, the following program cannot display it normally
ShtForm is the Form domain, Txt_CmpnyPrms is TEXTAREA
("<script language='javascript'>")
tempStr = "ShtForm.Txt_CmpnyPrms.innerText = ' " + HTMLEncode(v_Rs("Cmpny_Prms").GetChunk(1000)) + "';"
(tempStr)
("</script>")
The following is displayed in the source code of the display web page:
ShtForm.Txt_CmpnyPrms.innerText = ' efg<br/>
<br/>
s<br/>
fdad<br/>
f<br/>
a<br/>
fda<br/>
<br/>
fad';
How to solve this problem
1st floor
("<scr"+"ipt language='javascript'>");
("</scr"+"ipt>");
2nd floor
Is it a HTMLEncode problem?
3rd floor
To: sdts(Ange of God)
No, I added HTMLEncode later. When there is no HTMLEncode, the display format is as follows:
ShtForm.Txt_CmpnyPrms.innerText = 'efg
fdad
f
a
fda
fad';
4th floor
up
5th floor
tempStr = "ShtForm.Txt_CmpnyPrms.innerText =unescape('" + escape(v_Rs("Cmpny_Prms").GetChunk(1000)) + "')"
ShtForm is the Form domain, Txt_CmpnyPrms is TEXTAREA
("<script language='javascript'>")
tempStr = "ShtForm.Txt_CmpnyPrms.innerText = ' " + HTMLEncode(v_Rs("Cmpny_Prms").GetChunk(1000)) + "';"
(tempStr)
("</script>")
The following is displayed in the source code of the display web page:
ShtForm.Txt_CmpnyPrms.innerText = ' efg<br/>
<br/>
s<br/>
fdad<br/>
f<br/>
a<br/>
fda<br/>
<br/>
fad';
How to solve this problem
1st floor
("<scr"+"ipt language='javascript'>");
("</scr"+"ipt>");
2nd floor
Is it a HTMLEncode problem?
3rd floor
To: sdts(Ange of God)
No, I added HTMLEncode later. When there is no HTMLEncode, the display format is as follows:
ShtForm.Txt_CmpnyPrms.innerText = 'efg
fdad
f
a
fda
fad';
4th floor
up
5th floor
tempStr = "ShtForm.Txt_CmpnyPrms.innerText =unescape('" + escape(v_Rs("Cmpny_Prms").GetChunk(1000)) + "')"