我正在使用no-ip.com免费域名,并且在使用Chrome时我的三星S7上的网站加载正常,但是当我尝试使用Javascript和三星互联网浏览器这是我手机的预装浏览器时,计算不起作用。
这是我的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>
请帮忙。谢谢。我不知道为什么我要添加细节来发布这个但是无论如何。
没有冒犯的意思。但三星不是主要的网络浏览器制造商。考虑使用CHrome,Firefox,Opera等,你会变得更快乐。
恕我直言,三星应该专注于硬件和自定义手机中的操作系统和应用程序。在网络上工作,我们遇到了很多问题,这些问题只发生在三星浏览器中。虽然它基于Chromium,但它的行为与Chromium不同。
尝试查看是否可以将手机连接到计算机并检查Web浏览器以查看页面中是否有任何错误。这可能有所帮助。
改为CDN,现在可以使用了。