0
私は質問結果への回答を生成し、htmlに配置するページに簡単なJSクイズを持っています。回答のカップルでは、それが好きな人は 'ここをクリックして詳細を聞いてください'と言っています。どのようにHTMLに配置されているJS文字列へのリンクを追加するのですか?JSドリブンクイズの回答にリンクを追加するにはどうすればよいですか?
このついて行くにはどのように本当にわからないJSに非常に新しいイム...
これはで呼び出さなっているJSです:
{ // Question
"q": "<h4>Is it recommended to use one vial of BOTOX<sup>®</sup> on more than one patient?</h4>",
"a": [
{"option": "TRUE", "correct": false},
{"option": "FALSE", "correct": true}
],
"correct": "<p><span>CORRECT!</span> As the diluents in BOTOX<sup>®</sup> do not contain a preservative it is not recommended to use on more than one patient.2 If you would like to refer to this information again, it can be found via the link below.</p>",
"incorrect": "<p><span>INCORRECT.</span> As the diluents in BOTOX<sup>®</sup> do not contain a preservative it is not recommended to use on more than one patient.<sup>2</sup> If you would like to refer to this information again, it can be found via the link below.</p><p>***here is where I would like the link to be***</p>"
},
どのように/それをスクリプトに追加しますか?そして、html文字列でvarをどのように呼び出すのですか? – DaveP19
既存のコードブロックにURLを追加することができます。私はあなたが現在のJavascriptを使って何をしようとしているのか本当に分かりません。コードをもっと投稿して、HTMLをどのように操作しているのか考えてください。 –
ああ私はリンクを追加するコードを書くにはどうすればいいですか... 上記のjsコードで私はこれを持っています -
***ここに私がリンクを希望したい場所です
- 私はリンクを書く必要があるthats。だから私はどのようにそのスペースでリンクvarと呼ぶのですか? – DaveP19