LoginSignup
0
0

More than 5 years have passed since last update.

window.open() の覚え書き

Last updated at Posted at 2018-11-16

内容

1.オプション
2.外部pdfファイル表示

オプション

よく忘れがちなのでメモメモ

アドレスバー非表示

location=no

urlのみ非表示

hideurlbar=yes

Doneボタン文言変更

closebuttoncaption=完了

ナビゲージョンボタン非表示

hidenavigationbuttons=yes

ズームインズームアウト

EnableViewPortScale=yes

外部PDFファイル表示

iOSの場合

オプションなし

ソースコード

window.open('http://xxxx.xx.xx/xxx.pdf', "_blank", "");

実行結果
ios_default.png

オプションあり

ソースコード

window.open('http://xxxx.xx.xx/xxx.pdf', "_blank", "location=no,toolbar=yes,EnableViewPortScale=yes,closebuttoncaption=完了,hidenavigationbuttons=yes");

実行結果
ios_options.png

Androidの場合

オプションなし

ソースコード

window.open('https://docs.google.com/viewer?url=http://xxxx.xx.xx/xxx.pdf&embedded=true', "_blank", "");

実行結果
android_default.png

オプションあり(PDF表示する際にGoogleDocViewを利用)

ソースコード

window.open('https://docs.google.com/viewer?url=http://xxxx.xx.xx/xxx.pdf&embedded=true', "_blank", "hideurlbar=yes,hidenavigationbuttons=yes");

実行結果
android_options.png

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0