Line breaks in textarea element

后端 未结 8 1576
借酒劲吻你
借酒劲吻你 2020-12-30 22:18

This is PURE HTML. (no php or anything like that, if you want to know the background its a C# application with HTML in a web view).

All my HTML files are nicely form

相关标签:
8条回答
  • 2020-12-30 23:10

    You can use <div> with contenteditable attribute:

    <div contenteditable="true" style="width: 450px; height: 300px; white-space: pre-line;" name="familyPlanningClinicSessionsClinicTimes">Monday:
                                Tuesday:
                                Wednesday:
                                Thursday:
                                Friday:
                                Saturday:
                                Sunday:</div>
    

    But in your case I think idea solution will be just using several ordinary text boxes, one for each day:

    Monday: <input type="text" name="familyPlanningClinicSessionsClinicTimesMonday" /><br />
    Tuesday: <input type="text" name="familyPlanningClinicSessionsClinicTimesTuesday" /><br />
    ...
    
    0 讨论(0)
  • 2020-12-30 23:13

    In C# if you want to send a new line to a textarea you can use Environment.NewLine

    0 讨论(0)
提交回复
热议问题