如何解决不会出现Bootstrap模式中预期的换行符
我在同一页上打开了Bootstrap模态,我相信它们是相同的代码(变量除外),但显示方式不同。我已经寻找了2个多小时,现在看不到它们之间的区别,因此,我需要一些新鲜的眼睛:)
无法正确包装的MapOne JavaScript。
1.Resource Group | az group create -l westeurope -n Domains
2.CDN > profile > create | az cdn profile create -g Domains -n HomeProfile --sku Premium_Verizon
3.CDN > endpoint > create | az cdn endpoint create -g Domains -n HomeEndpoint --profile-name HomeProfile --origin www.home1991-2000.com
4.DNS > Zones > create | az network dns zone create -g Domains -n www.home1991-2000.com
5.DNS > Record sets > CNAME > create | az network dns record-set cname create -g Domains -z www.home1991-2000.com -n HomeRecordSet
6.eventgrid > domain > create | az eventgrid domain create -g Domains --name home1991-2000 -l westeurope
7.CDN > custom-domain > create | az cdn custom-domain create -g Domains --endpoint-name HomeEndpoint --profile-name HomeProfile -n home1991-2000-name --hostname www.home1991-2000.com
未正确包装的MapOne HTML:
let userResultMapOne;
if ((userInputMapOne > absoluteValueMapOne) && (answerMapOne === zoneOutcomeMapOne)) {
userResultMapOne = "But your value of " + userInputMapOne + " is too high for this scenario.";
} else if ((userInputMapOne < absoluteValueMapOne2) && (answerMapOne === zoneOutcomeMapOne)) {
userResultMapOne = "But your value of " + userInputMapOne + " is too low for this scenario.";
} else if ((userInputMapOne > absoluteValueMapOne) && (answerMapOne !== zoneOutcomeMapOne)) {
userResultMapOne = "And your value of " + userInputMapOne + " is too high for this scenario.";
} else if ((userInputMapOne < absoluteValueMapOne2) && (answerMapOne !== zoneOutcomeMapOne)) {
userResultMapOne = "And your value of " + userInputMapOne + " is too low for this scenario.";
} else if (answerMapOne !== zoneOutcomeMapOne) {
userResultMapOne ="Although your value of " + userInputMapOne + " fits well if the zone is correct.";
} else userResultMapOne = "Your value of " + userInputMapOne + " fits well in this scenario.";
console.log("User result",userResultMapOne);
//Outputs generated for the user to check their work
document.getElementById("MapOneResultOne").innerHTML = resultsMapOne;
document.getElementById("MapOneResultTwo").innerText = userResultMapOne;
document.getElementById("MapOneResultThree").innerHTML = "Our calculations: " + Math.abs(zoneCalcMapOne).toFixed(2) + " m " + zoneOutcomeMapOne;
div在模式内部。
MapOne无法正确显示的结果:
但是两个地图确实可以正确显示。
MapTwo的JavaScript
<div><span id="MapOneResultOne"></span></div>
<div><span id="MapOneResultTwo"></span></div>
<div><span id="MapOneResultThree"></span></div>
以及MapTwo的HTML:
let userResultMapTwo;
if ((userInputMapTwo > absoluteValueMapTwo) && (answerMapTwo === zoneOutcomeMapTwo)) {
userResultMapTwo = "But your value of " + userInputMapTwo + " is too high for this scenario.";
} else if ((userInputMapTwo < absoluteValueMapTwo2) && (answerMapTwo === zoneOutcomeMapTwo)) {
userResultMapTwo = "But your value of " + userInputMapTwo + " is too low for this scenario.";
} else if ((userInputMapTwo > absoluteValueMapTwo) && (answerMapTwo !== zoneOutcomeMapTwo)) {
userResultMapTwo = "And your value of " + userInputMapTwo + " is too high for this scenario.";
} else if ((userInputMapTwo < absoluteValueMapTwo2) && (answerMapTwo !== zoneOutcomeMapTwo)) {
userResultMapTwo = "And your value of " + userInputMapTwo + " is too low for this scenario.";
} else if (answerMapTwo !== zoneOutcomeMapTwo) {
userResultMapTwo ="Although your value of " + userInputMapTwo + " fits well if the zone is correct.";
} else userResultMapTwo = "Your value of " + userInputMapTwo + " fits well in this scenario.";
console.log("User result",userResultMapTwo);
//Outputs generated for the user to check their work
document.getElementById("MapTwoResultOne").innerHTML = resultsMapTwo;
document.getElementById("MapTwoResultTwo").innerText = userResultMapTwo;
document.getElementById("MapTwoResultThree").innerHTML = "Our calculations: " + Math.abs(zoneCalcMapTwo).toFixed(2) + " m " + zoneOutcomeMapTwo;
以及MapTwo如何正确显示:
从我所看到的一切中,我找不到我的错误以及为什么会出现这种差异。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。