Skip to content

Instantly share code, notes, and snippets.

@garyt
Created January 12, 2012 22:06
Show Gist options
  • Save garyt/1603438 to your computer and use it in GitHub Desktop.
Save garyt/1603438 to your computer and use it in GitHub Desktop.
xsl input with attributes
<input id="webSearchInput" value="Press Enter to search..." name="query" type="text">
<xsl:attribute name="onblur">
<xsl:text>if (this.value == '') {this.value = 'Press Enter to search...';}</xsl:text>
</xsl:attribute>
<xsl:attribute name="onfocus">
<xsl:text>if (this.value == 'Press Enter to search...') {this.value = '';}</xsl:text>
</xsl:attribute>
</input>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment