我有一些代码要在我的webpage. 起初我只是想使用JS,但现在我按照建议将其包装在JQuery中here. 代码正在页面中加载,但未发生警报。。。
jQuery(document).ready(function( $ ){
window.onload = function() {
alert(location.href);
if(location.href != "https://linestar.ca/contact-us/") {
alert("Make sure you use the right contact Tab!");
} else {
echo"LineStar Welcomes You!"
}
};
});