質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
パスワード

パスワードは主に情報にアクセスする際に扱われます。主に、アクセス可能なユーザーを限定する手段として使われます。

ポップアップ

一般的に、ポップアップは、ウィンドウやアプリケーションに上に浮かぶUIエレメントを指します。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

Q&A

1回答

1017閲覧

ポップアップ表示ができない!!

my521

総合スコア16

パスワード

パスワードは主に情報にアクセスする際に扱われます。主に、アクセス可能なユーザーを限定する手段として使われます。

ポップアップ

一般的に、ポップアップは、ウィンドウやアプリケーションに上に浮かぶUIエレメントを指します。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

0グッド

0クリップ

投稿2020/08/07 02:36

編集2020/08/07 13:40

パスワードを入力する欄を作ろうと思い、ポップアップ表示を使おうとしたのですが、
ボタンを押してもポップアップ表示されません。
間違えている箇所がありましたらご指摘お願いします。

<html> <script type="text/javascript"> function handan(){ pass = window.prompt("パスワードを入力してください。", ""); if(pass=='12345'){ window.open('https://teratail.com/questions/283167'); } } </script> <body> <p><input type="button" value="パスワード" onClick="handan()"></p> </body> </html>

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

maisumakun

2020/08/07 02:38

ブラウザは何を使っていますか?
yoorwm

2020/08/07 02:42

コピペミスはありませんか? ifの所の{に対応する}が無いのでは?
kei344

2020/08/07 13:46

回答が付いた質問の編集は慎重に行ってください。質問文のコードについて回答にて指摘があった場合は「追記」し、元のコードを編集する場合も「直したこと」がわかるようにしてください。後から見た人から見て、現在回答されておられる方の回答が「無いコードに対しての指摘」になり、意味がわからなくなります。
my521

2020/08/07 13:49

以下のエラーコードが出ていました。 24 Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan onclick @ 1200510057-atari-emb…Fm%3D__features__:1 (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan onclick @ 1200510057-atari-emb…Fm%3D__features__:1 (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan onclick @ 1200510057-atari-emb…Fm%3D__features__:1 (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan VM381:3 Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan @ VM381:3 VM381:3 Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan @ VM381:3 (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan onclick @ 1200510057-atari-emb…Fm%3D__features__:1 (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan (unknown) Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set. handan
guest

回答1

0

html

1</script>

の前にもうひとつ } を

html

1} 2</script>

(ネストはちゃんと整えましょう)

投稿2020/08/07 02:46

showkit

総合スコア1638

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問