为什么Java Swal Fire方法不起作用?

时间:2019-10-22 13:26:40

标签: javascript php html

<script type="text/javascript">
    function musterisecme() {
        var musterilistesi = document.getElementById("musterilistesi");
        var secilendeger = musterilistesi.options[musterilistesi.selectedIndex].value;
        if (secilendeger == "musteri_ekle") {
            Swal.fire({
                title :"Dikkat!",
                text :"Müşteri ekleme sayfasına yönlendirilmek istediğinize eminmisiniz?",
                type: "warning",
                showCancelButton:true
            })
        } 
    }
    </script>

我的代码就是这种方式,但可能是我收到此错误的原因吗?

  

错误:未捕获ReferenceError:未定义Swal       在musterisecme(domainekle.php:314)       在HTMLSelectElement.onchange(domainekle.php:226)

1 个答案:

答案 0 :(得分:0)

您可以检查SweetAlert2的CDN是否正确吗?

如果没有,请使用以下任何一种方法:

Z' = A*Y*A^t

OR

(*Generate random axes and a rotation matrix for testing purposes*)
a = RotationMatrix[RandomReal[{0, \[Pi]}], 
   Normalize[RandomReal[{-1, 1}, 3]]];
t1 = RandomReal[{0, \[Pi]}];
t2 = RandomReal[{0, \[Pi]}];
t3 = RandomReal[{0, \[Pi]}];
r = RotationMatrix[t1, a[[All, 1]]].
    RotationMatrix[t2, a[[All, 2]]].
    RotationMatrix[t2, a[[All, 3]]];

(*Decompose rotation matrix 'r' into the axes of 'a'*)
rp = Transpose[a].r.a;
{a1, a2, a3} = EulerAngles[rp, {1, 2, 3}];
xp = a.RotationMatrix[a1, {1, 0, 0}].Transpose[a];
yp = a.RotationMatrix[a2, {0, 1, 0}].Transpose[a];
zp = a.RotationMatrix[a3, {0, 0, 1}].Transpose[a];

(*Test that the generated matrix is equal to 'r' (should give 0)*)
xp.yp.zp - r // MatrixForm

(*Test that the individual rotations preserve the axes (should give 0)*)
xp.a[[All, 1]] - a[[All, 1]]
yp.a[[All, 2]] - a[[All, 2]]
zp.a[[All, 3]] - a[[All, 3]]