跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 关于随机头像的实验
未分類
15 2 月 2020

关于随机头像的实验

zxxx 大佬有话说 : 2019-12-22 16:39:01

关于随机头像的实验

<!DOCTYPE html>
<html>

<head>
<script src="/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function() {
    d = new Date();
    $(‘#avatar1’).attr(‘src’, "https://api.uomg.com/api/rand.avatar?" + Math.random());
    d = new Date();
    $(‘#avatar2’).attr(‘src’, "https://api.uomg.com/api/rand.avatar?" + Math.random());
    d = new Date();
    $(‘#avatar3’).attr(‘src’, "https://api.uomg.com/api/rand.avatar?" + Math.random());
});
</script>
</head>

<body>
<img id="avatar1">
<img id="avatar2">
<img id="avatar3">
</body>

</html>

ncnc 大佬有话说 : 2019-12-22 16:39:56

怎么才能上传头像 我一直失败,没办法了
今天发现用摄像头可以~ 就上传了 🙁

zxxx 大佬有话说 : 2019-12-22 16:40:31

<!DOCTYPE html>
<html>

<head>
<script src="/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function() {
d = new Date();
document.getElementById("avatar1").src = "https://api.uomg.com/api/rand.avatar?"+ Math.random();
d = new Date();
document.getElementById("avatar2").src = "https://api.uomg.com/api/rand.avatar?"+ Math.random();
d = new Date();
document.getElementById("avatar3").src = "https://api.uomg.com/api/rand.avatar?"+ Math.random();
});
</script>
</head>

<body>
<img id="avatar1">
<img id="avatar2">
<img id="avatar3">
</body>

</html>

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具