Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2008
    Posts
    80
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Question Functions under a script

    Dear all,

    Instead writing many scripts each one with 1 function could I writing several functions under one script? <script type = "text/javascript"> several functions </script>

    Thanks

  2. #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    3,366
    Thanks
    3
    Thanked 585 Times in 571 Posts
    Hi there BOBKUSPE,

    yes, you may have more than one function within the "script element".

    When using the "HTML5 DOCTYPE", you may also safely dispense with
    the type="text/javascript" attribute.

    coothead
    ~ the original bald headed old fart ~

  3. Users who have thanked coothead for this post:

    BOBKUSPE (Oct 7th, 2018)


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •