prototypejsrjs

What is Prototype's equivalent method to JavaScript's innerHTML property?


How can I retrieve HTML content using Prototype? Or how can I fetch HTML content using RJS?


Solution

  • $('fruit').innerHTML will give you the inner-html of an element with id fruit.

    Access innerHTML through rjs like this: page["fruit"]["innerHTML"]

    The above code will translate into: $("fruit").innerHTML;