---
title: "rails页面技巧"
author: "yangbinfc"
date: "2011-03-02T18:48:00Z"
tags: []
slug: "rails"
draft: false
lastmod: "2012-11-04T17:47:35Z"
id: 1715350
url: "https://yangbinfc.iteye.com/blog/1715350"
---

1：create.js.erb

中 ：$("#comments").append("&lt;%= escape\_javascript(render @comment)%&gt;"); 插入\_comment局部模板用escape\_javascript生成一段舞script标记的代码