【问题标题】:coffeescript and haml in pop ups弹出窗口中的咖啡脚本和haml
【发布时间】:2012-04-17 12:44:27
【问题描述】:
popitup = (url) ->
  newwindow = window.open(url, "name", "height=200,width=150")
  newwindow.focus()  if window.focus
  false

这是我的代码,但我想将弹出窗口链接到 haml 文件而不是 URL 以显示在我的弹出窗口中

%h1 popup
br
%input{:name => "option1", :type => "checkbox", :value => "Milk"}
Milk                   
%br                   
%input{:name => "option2", :type => "checkbox", :value => "Butter"}                 
Butter                  
%br                   
%input{:name => "option3", :type => "checkbox", :value => "Cheese"}                    
Cheese                      
%br

这是haml文件 我正在使用咖啡脚本

【问题讨论】:

    标签: ruby-on-rails coffeescript haml


    【解决方案1】:

    您应该创建一个显示弹出窗口并使用其 url 的操作。

    在不相关的注释上,您应该为复选框旁边的文本使用标签,以便单击文本的用户可以切换复选框。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-12
      • 1970-01-01
      • 2014-04-27
      • 1970-01-01
      • 1970-01-01
      • 2013-01-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多