用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - html代码库

via 美化 html

2023-09-17 作者: 天才举报

[html]代码库

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="font-size:40px;font-weight:bold;"><p style="display:inline;color:#496835;margin:0;">Search</p><p style="display:inline;color:#A9CBB8;margin:0;"> For</p></div>

<script >
document.addEventListener("DOMContentLoaded", function () {
var h,
b = document.getElementById("search_submit"),
c = document.createElement("select"),
e = [],
f = search,
g = {
i: { name: "默认", url: "" },
bd: { name: "百度", url: " https://m.baidu.com/s?word=" },
gg: { name: "谷歌", url: " https://www.google.com/search?query=" },
bing: { name: "必应", url: " https://cn.bing.com/search?q=" },
wz: {
name: "无追",
url: " https://wuzhuiso.com/s?q="
},
dk: { name: "Duck", url: " https://duckduckgo.com/?q=" },
gk: { name: "夸克", url: " https://quark.sm.cn/s?q=" },
sg: {
name: "搜狗",
url: " https://m.sogou.com/web/searchList.jsp?keyword="
},
tt: {
name: "头条",
url: " https://m.toutiao.com/search?keyword="
},
zh: {
name: "知乎",
url: " https://www.zhihu.com/search?q="
},
c: { name: "其他", url: localStorage.c || "" },
m: {
name: "重设",
disabled: (!localStorage.c || "c" !== localStorage.se) && "disabled"
}
};
(c.style.color="#A0CAA9"),
(c.style.float = "left"),
(c.style.height = "46px"),
(c.style.border = "none"),
(c.style.paddingLeft = "10px"),
(c.style.background = "transparent"),
(c.style.outline = "none"),
(c.style.borderRadius = "inherit");
for (h in g)
e.push(
"<option value=" +
h +
" " +
(g[h].disabled || "") +
">" +
g[h].name +
"</option>"
);
(c.innerHTML = e.join("")),
(c.onchange = function () {
var b, c;
"c" !== this.value && "m" !== this.value
? ((b = !0), (localStorage.se = this.value))
: ((c = prompt(
"请修改自定义地址\n注:via上取消也可能会清空(′⊙ω⊙`)",
localStorage.c
)),
(c = (c || "").trim()),
(b = !c),
(this.value = b ? "i" : "c"),
(localStorage.c = c)),
(this.children[this.children.length - 1].disabled = b);
}),
(c.value = localStorage.se || "i"),
b.parentElement.insertBefore(c, b),
(search = function () {
var a = document.getElementById("search_input");
return (
(a.value = a.value.trim()),
a.value ? ((a.value = g[c.value].url + a.value), f()) : !1
);
});
});
</script>

<!--上搜索栏一言-->
<script src="https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0"></script>
<script type="text/javascript">
var xhr = new XMLHttpRequest();
xhr.open('get', 'https://v1.jinrishici.com/all.txt');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
var gushici = document.getElementsByTagName("title")[0];
gushici.innerText = xhr.responseText;
}
};
xhr.send();
</script>
<script type="text/javascript">
var s = false;
var t =document.getElementsByTagName("title")[0];
if(s){
t.innerHTML = str[0]+str[1];
}else{
t.innerHTML = str[0];
}
</script>

</body>
</html>


网友评论    (发表评论)


发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...