Hi,

This mailing list is for discussion about using JavaScript in GNOME, which
doesn't have document.getElementById() or a HTML DOM — probably Stack
Overflow would be a better place for you to get help.

Good luck!
Philip


On Thu, Jan 20, 2022 at 2:14 AM Deepak Goel via javascript-list <
javascript-list@gnome.org> wrote:

> Hello
>
> I have written a small piece of Javascript/HTML. However I cannot align
> the text properly in the text field. Any ideas?
>
> ==========================================================
> <!DOCTYPE html>
> <html>
> <head>
>
> <style>
> .Large
> {
>     border: 1px solid black;
>     padding: 10px;
>     height: 400px;
>     width: 400px;
>     text-align: left;
> }
> </style>
>
> </head>
> <body>
> <button onclick="change()">Change Text</button>
> <button onclick="change1()">Change Text</button>
> <input type="text" id="my_field" maxlength="100" size="100" class="Large"
> value="Deepak">
>
> <script>
> function change(){
> var txt = "TechXp is an Experiential Technology firm,"
> + "\n" +" focused on providing agencies and their clients with digital
> experiential solutions.";
> document.getElementById("my_field").value = txt;
> }
>
> function change1(){
> var txt = "Atlanta Estate, Off, Western Express Hwy, ITT Bhatti, Hanuman
> Tekdi, Goregaon, Mumbai, Maharashtra 400063";
> document.getElementById("my_field").value = txt;
> }
>
> </script>
> </body>
> </html>
>
> ==========================================================
>
>
> Thanks & Regards,
> Deepak Goel
> 7350012833
> deep...@techxp.tech
> _______________________________________________
> javascript-list mailing list
> javascript-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/javascript-list
>


-- 
Philip
_______________________________________________
javascript-list mailing list
javascript-list@gnome.org
https://mail.gnome.org/mailman/listinfo/javascript-list

Reply via email to