当我在IE中使用JavaScript window.open()
时,最大按钮始终处于禁用状态。
如何启用按钮?我使用Chrome& amp; Firefox浏览器。
答案 0 :(得分:7)
您需要设置参数值resizable=yes
试试这段代码:
var url = "www.google.com" // set your url.
window.open(url, "popUp", "resizable=yes");
答案 1 :(得分:0)
# This controller serves as a parent controller for other likes_controllers.
# Posts::LikesController for example.
# Child controller that inherit from this LikesController should implement
# before_action :set_likeable, which sets @likeable.
class API::LikesController < ApplicationController
before_action :authenticate_user!
before_action :set_likeable
skip_before_action :verify_authenticity_token
def create
current_user.add_like_to(@likeable)
notify_author
render json: { liked: true, count: @likeable.reload.likes.size, type: @likeable.class.to_s, id: @likeable.id }, status: 200
end
def destroy
current_user.remove_like_from(@likeable)
render json: { liked: false, count: @likeable.reload.likes.size, type: @likeable.class.to_s, id: @likeable.id }, status: 200
end
private
def notify_author
unless current_user?(@likeable.user)
Notification.create(recipient: @likeable.user, actor: current_user, action: "liked your", notifiable: @likeable, is_new: true)
end
end
end
功能添加resizable=yes
后,iE正常运行。
我的代码:
window.open