Class JavaScript

java.lang.Object
org.zkoss.html.JavaScript

public class JavaScript extends Object
Represents a javascript element.
Since:
6.0.0
Author:
tomyeh
  • Constructor Details

    • JavaScript

      public JavaScript(String src, String charset)
      Creates by specifying the file to contain the JavaScript codes.
      Parameters:
      src - URI of the file containing the JavaScript codes.
      charset - the charset. If null, "UTF-8" is assumed.
    • JavaScript

      public JavaScript(String content)
      Creates by assigning the content (JavaScript codes).
      Parameters:
      content - the JavaScript codes.
  • Method Details

    • getSrc

      public String getSrc()
      Returns the URI of the file containing the JavaScript codes, or null if getContent() is not null.
    • getCharset

      public String getCharset()
      Returns the charset, or null if getContent() is not null.
    • getContent

      public String getContent()
      Returns the JavaScript codes, or null if getSrc() is not null.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object