• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. String() > Example: Strings in HTML

Example: Strings in HTML

Earlier in this chapter, I demonstrated how the location.search object is a string by first taking a substr() of the object, and then applying split() to the results. However, many HTML elements, especially form elements, support value attributes. These attributes expose themselves to JavaScript in the form of strings.

With that in mind, it becomes very easy to construct a simple testbed for any JavaScript or HTML code you want to debug. All you really need is a few basic form elements and some JavaScript.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint