Problem with Rails ERb rendering?
A very simple HTML in my .erb file:
<a href="javascript:void(0)" id="xyz">Click</a>
But when browsing this code in the browser, I get the link which text is:
Click (jav开发者_JAVA技巧ascript:void(0)).
Could you please help me explain why it is? Thanks much for your help.
My development environment: Ruby 1.8.7 Rails 2.3.4
I have seen this happening when I had deployed my Rails application and browser was thinking that I'm in a "Print" mode. It'll append a URL after each link so that you don;t have to guess what link is after you print it on paper.
In my case it was happening with Blueprint CSS framework. See if you can fix it by disabling any CSS for "print"
精彩评论