Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is <%= ... %>

For example:

<input id="wineId" name="id" type="text" value="<%= id %>" />

I know it is printing the value of a JSON string id attribute ( i.e. {id:100} ). But I am not finding any documentation on it, or even my Google-Fu can't find it. This SO post assumes it is a Microsoft Response.write() method but I found it in a context having nothing to do with Microsoft code.

I was reading about backbone.js in general, this four-part backbone tutorial by Christophe Coenraets specifically and this particular page (line 4) particularly.

I've searched the "developer.mozilla.org" site under both html and javascript docs looking for it. Am I blind? Any help greatly appreciated!

like image 999
Ricalsin Avatar asked Dec 12 '22 00:12

Ricalsin


1 Answers

It's an underscore.js template. It's used by backbone. See: http://underscorejs.org/#template

like image 88
Jon Wells Avatar answered Dec 27 '22 12:12

Jon Wells