我正在使用no-ip.com免费域,并且在使用Chrome浏览器时,该网站在我的Samsung S7上可以正常加载,但是当我尝试将Javascript与三星Internet浏览器(该手机已预装浏览器)一起使用时,计算结果不会工作。
这是我的Javascript和HTML代码:
function Run1() {
//METRIC TO METRIC
var SpecialValue = 0;
if (document.getElementById("MetricAndImperial1").value == 1000000000000000000000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000000000000000000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000000000000000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000000000000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000000000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1000)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 100)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 10)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .1)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .01)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .000001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .000000001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .000000000001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .000000000000001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .000000000000000001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .000000000000000000001)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1.0E-24)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .0254)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .3048)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == .9144)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1609.344)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial1").value == 1852)
{
SpecialValue = document.getElementById("Input1").value * document.getElementById("MetricAndImperial1").value / document.getElementById("MetricAndImperial2").value;
document.getElementById("Input2").value = SpecialValue;
}
}
function Run2() {
//METRIC TO METRIC INPUT 2
if (document.getElementById("MetricAndImperial2").value == 1000000000000000000000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000000000000000000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000000000000000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000000000000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000000000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1000)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 100)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 10)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .1)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .01)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000000000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000000000000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000000000000000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000000000000000000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .000000000000000000000001)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .0254)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == .3048)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 0.9144)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1609.344)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
else if (document.getElementById("MetricAndImperial2").value == 1852)
{
SpecialValue = document.getElementById("Input2").value * document.getElementById("MetricAndImperial2").value / document.getElementById("MetricAndImperial1").value;
document.getElementById("Input1").value = SpecialValue;
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Converter</title>
</head>
<body>
<p>From:</p>
<select id="MetricAndImperial1" class="js-example-basic-single" onchange="Run2()">
<option value="0.0254">Inches</option>
<option value="0.3048">Feet</option>
<option value="0.9144">Yards</option>
<option value="1609.344">Miles</option>
<option value="1852">Nautical Miles</option>
<option value="1000000000000000000000000">Yottameter</option>
<option value="1000000000000000000000">Zettameter</option>
<option value="1000000000000000000">Exameter</option>
<option value="1000000000000000">Petameter</option>
<option value="1000000000000">Terameter</option>
<option value="1000000000">Gigameter</option>
<option value="1000000">Megameter</option>
<option value="1000">Kilometer</option>
<option value="100">Hectometer</option>
<option value="10">Decameter</option>
<option value="1">Meter</option>
<option value=".1">Decimeter</option>
<option value=".01">Centimeter</option>
<option value=".001">Millimeter</option>
<option value=".000001">Micrometer</option>
<option value=".000000001">Nanometer</option>
<option value=".000000000001">Picometer</option>
<option value=".000000000000001">Femtometer</option>
<option value=".000000000000000001">Attometer</option>
<option value=".000000000000000000001">Zeptometer</option>
<option value=".000000000000000000000001">Yoctometer</option>
<option value="198">Rods</option>
<option value="7920.02">Furlongs</option>
<option value="4">Hands</option>
<option value="72">Fathoms</option>
<option value="218740">Leagues</option>
</select>
<input style="height:50%;font-size:60pt;width:1000px;" id="Input1" type="number" oninput="Run1()" onchange="Run1()" />
<p>To:</p>
<select id="MetricAndImperial2" class="js-example-basic-single" onchange="Run1()">
<option value="0.0254">Inches</option>
<option value="0.3048">Feet</option>
<option value="0.9144">Yards</option>
<option value="1609.344">Miles</option>
<option value="1852">Nautical Miles</option>
<option value="1000000000000000000000000">Yottameter</option>
<option value="1000000000000000000000">Zettameter</option>
<option value="1000000000000000000">Exameter</option>
<option value="1000000000000000">Petameter</option>
<option value="1000000000000">Terameter</option>
<option value="1000000000">Gigameter</option>
<option value="1000000">Megameter</option>
<option value="1000">Kilometer</option>
<option value="100">Hectometer</option>
<option value="10">Decameter</option>
<option value="1">Meter</option>
<option value=".1">Decimeter</option>
<option value=".01">Centimeter</option>
<option value=".001">Millimeter</option>
<option value=".000001">Micrometer</option>
<option value=".000000001">Nanometer</option>
<option value=".000000000001">Picometer</option>
<option value=".000000000000001">Femtometer</option>
<option value=".000000000000000001">Attometer</option>
<option value=".000000000000000000001">Zeptometer</option>
<option value=".000000000000000000000001">Yoctometer</option>
<option value="198">Rods</option>
<option value="7920.02">Furlongs</option>
<option value="4">Hands</option>
<option value="72">Fathoms</option>
<option value="218740">Leagues</option>
</select>
<input style="height:50%;font-size:60pt;width:1000px;" id="Input2" type="number" oninput="Run2()" onchange="Run2()" />
<script language="Javascript" type="text/javascript" src="PrototypeMath.js"></script>
<script language="Javascript" type="text/javascript" src="jquery-3.3.1.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
<script>
$(document).ready(function() {
$(".js-example-basic-single").select2();
});
</script>
</body>
请帮助。谢谢。我不知道为什么我必须添加详细信息才能发布此内容,但无论如何。
答案 0 :(得分:0)
没有冒犯。但是三星并不是主要的网络浏览器制造商。考虑使用CHrome,Firefox,Opera等,您会变得更快乐。
恕我直言,三星应该专注于硬件并定制手机中的OS和应用程序。在网络上工作时,我们遇到了很多仅在三星浏览器中发生的问题。尽管它是基于Chromium的,但它的行为却不像Chromium。
尝试查看是否可以将电话连接到计算机,然后检查Web浏览器以查看页面中是否有任何错误。这可能会有帮助。
答案 1 :(得分:0)
已更改为CDN,并且现在可以使用。