您好我是这种编程语言的新手
我想'and'在列表中的最后一项之前添加单词.
例如:
myList = [1,2,3,4]
Run Code Online (Sandbox Code Playgroud)
如果我打印它输出必须像:
1,2,3 and 4
Run Code Online (Sandbox Code Playgroud) 我想从 URL 中提取 TLD,但它给了我整个 URL。例如https://www.google.com.uk -> .com.uk。
$(document).on("click", "a", function() {
var href = $(this).attr("href");
alert(href)// It gives me the whole link of website
if(href.search(".com.uk")){
alert("This website is AUTHENTIC!");
}
else
{
alert("Not AUTHENTIC!")
}
Run Code Online (Sandbox Code Playgroud)