[Javascript]Javascriptã§ãã³ãã¬ã¼ãã¨ã³ã¸ã³ãä½ã£ã¦ã¿ã
ååã®ã¨ã³ããªãããã¯ãã¼ã¯ãã¦ããã人ãå¤ãã£ãã®ã§å¬ãããªã£ã¦ä½ã£ã¦ã¿ã¾ããã
ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã¯AjaxPagesãåã¯ä½¿ã£ã¦ã¾ãããããµã¼ãã®ã¬ã¹ãã³ã¹ãæªãã¨ãã³ãã¬ã¼ãããã¼ãããåã«è¡¨ç¤ºãããã¨ãã¦ã¨ã©ã£ãã®ã§ãèªå好ã¿ã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ãä½ãã¾ããã
ç¹å¾´
- Javascriptã§ãã³ãã¬ã¼ãã使ãã
- å¤é¨ãã¡ã¤ã«ã使ãã(ã¿ã¤ã ã¢ã¦ããè¨å®ã§ããã)
- æååããã³ãã¬ã¼ãã¨ãã¦ä½¿ãã
- JSPã£ã½ãæ¸ãæ¹ãåºæ¥ã
- ãã³ãã¬ã¼ããå±éãããå 容ã確èªã§ããï¼ãããã¯ç°¡åï¼(ãããããªã)
- ã©ã¤ã»ã³ã¹ãMITã§ä½¿ãæ¾é¡
ãµã³ãã«ã¨ãã¦ã³ãã¼ã
使ãæ¹
jsTemplate('sample01.jshtml') // èªã¿è¾¼ã¿ ã¨ã©ã¼ãããã°éç¥ .load(function(e){ alert('error '+e); }) // ã¬ã³ããªã³ã° .rendering(function(render){ var str = render({aa:'AA'});// å¤ã渡ã $('stage1').innerHTML=str; });
- jsTemplateã§å¤é¨ãã¡ã¤ã«ãæååã渡ã
- loadããã¨æå®ãããå¤é¨ãã¡ã¤ã«ãèªã¿ã«ãã(loadããªãå ´åã¯æå®ãããæååããã³ãã¬ã¼ãã¨ãã¦è§£éããã)
- renderingã§ã³ã¼ã«ããã¯ã§æ¸¡ãããå¼æ°(renderé¢æ°)ãå®è¡ããã¨ãã³ãã¬ã¼ããã¬ã³ããªã³ã°ãããæååãåããã
- ãã³ãã¬ã¼ãã®è¡¨è¨æ¹æ³
- <% ã %>é¨åã¯Javascriptã¨ãã¦è§£éããã¾ãã
- <%="" %>ã§ãªãã©ã«ã表示ã§ãã¾ãã
- <%=context.XXX %>ã§renderingã®ã³ã¼ã«ããã¯ã®renderé¢æ°ã§æ¸¡ããå¤ãåå¾ã§ããã