I am using some nested layouts in Ruby on Rails, and in one of the layouts i have a need to read in a string from a div and set that as the title of the document.(我在Ruby on Rails中使用了一些嵌套布局,在其中一个布局中,我需要读取div中的字符串并将其设置为文档的标题。)
What is correct way (if any) to set the title of the document?(设置文档标题的正确方法是什么(如果有的话)?)<script type="text/javascript">
$(document).ready(function() {
// ???
});
</script>
ask by Jason Miesionczek translate from so