小编Zoo*_*oom的帖子

拒绝在框架中显示,因为它将“X-Frame-Options”设置为“SAMEORIGIN”

我正在开发一个包含简单 iframe 的网站

<iframe src="" frameborder="0" scrolling="no" id="product" width="100%" height="100%"></iframe>
Run Code Online (Sandbox Code Playgroud)

我在控制台中出现此错误消息: 拒绝在框架中显示 ' http://fr.allsaints.com/women/shop-accessories/allsaints-rally-keyfob/?colour=42&category=700 ' 因为它设置了 'X -“框架选项”为“SAMEORIGIN”。

我该怎么做才能显示它?

html javascript iframe

1
推荐指数
1
解决办法
3779
查看次数

为什么我的UITextField委托方法没有被调用?

这是我的问题.我创建了一个UITextField.

.h文件:

@property (strong, nonatomic) UITextField *emailTextField;
Run Code Online (Sandbox Code Playgroud)

.m文件:

- (void)viewDidLoad
{
  [super viewDidLoad];
  self.emailTextField.delegate=self;
  [self setTextFields:120 :@"  email" :self.emailTextField];
}

-(void)setTextFields:(float)ycoord :(NSString *)text :(UITextField *)textField
{
  CGRect frame = CGRectMake(60, ycoord, 180, 30);
  textField = [[UITextField alloc]initWithFrame:frame];
  textField.backgroundColor = [UIColor whiteColor];
  textField.placeholder = text;
  textField.font = [UIFont fontWithName:@"Baskerville" size:15];
  textField.allowsEditingTextAttributes=YES;
  textField.autocorrectionType = UITextAutocorrectionTypeNo;

  CALayer *lay = [textField layer];
  [lay setCornerRadius:5.0f];
  [self.view addSubview:textField];
}
Run Code Online (Sandbox Code Playgroud)

目的是保存用户放在TextField中的文本.我尝试了委托方法

-(void)textFieldDidEndEditing:(UITextField *)textField
Run Code Online (Sandbox Code Playgroud)

但是没有调用该方法(我把一个NSLog检查).有人可以帮忙吗?

text delegates objective-c uitextfield ios

0
推荐指数
1
解决办法
6604
查看次数

Phantomjs 加载地址失败

感谢 PhantomJS,我正在尝试抓取此网页:https : //www.koshkamashkaeshop.com/fr/28-robes-Koshka-Mashka 但每次都无法加载。我认为这是因为https。这是我的 .sh 代码:

phantomjs  --ignore-ssl-errors=yes test.js
Run Code Online (Sandbox Code Playgroud)

这是我的 test.js 代码:

page.open(url, function (status) {

var content = page.evaluate(function()
 {
  if (status !== 'success') {
     console.log('FAIL to load the address');
  }else{

  }
 }
)})
Run Code Online (Sandbox Code Playgroud)

javascript ssl web-scraping phantomjs

0
推荐指数
1
解决办法
5514
查看次数