小编Sar*_*tia的帖子

为什么getElementbyId在这种情况下不起作用?

好的,这就是代码.当我运行它.它只有h1标签和3个子部分.它不从getElementByID函数中获取值并将其分配给相应的id.

<!Doctype html>
<html>
<head>
  <title>My Playlsit</title>
  <meta charset="utf-8">
  <script>
    function addsongs() {
      var song1 = document.getElementById('song1');
      var song2 = document.getElementById('song2');
      var song3 = document.getElementById('song3');

      song1.innerHTML = "Blue Suede Strings, By Elvis Pagely";
      song2.innerHTML = "Great Objects on Fire, by Jerry JSON Lewis";
      song3.innerHTML =  "I code the Line,by Johnny Javascripts"
    }    
    window.onload = "addsongs";
  </script>    
</head>
<body>
  <h1>My awesome Playlist</h1>
  <ul id="playlist">
    <li id = "song1"</li>
    <li id= "song2"</li>
    <li id = "song3"</li>
  </ul>
</body> …
Run Code Online (Sandbox Code Playgroud)

javascript html5

0
推荐指数
1
解决办法
51
查看次数

]无法在 Ubuntu 14 中启动 Android Studio

我首先在终端中输入此命令,将目录更改为终端,然后当我尝试打开 studio.sh 时,它会出现 bash 错误

sarthak@sarthak:~/development$ /android-sdk/bin/studio.sh
bash: /android-sdk/bin/studio.sh: No such file or directory
sarthak@sarthak:~/development$ 
Run Code Online (Sandbox Code Playgroud)

请帮忙

linux ubuntu android android-studio

-2
推荐指数
1
解决办法
3112
查看次数

标签 统计

android ×1

android-studio ×1

html5 ×1

javascript ×1

linux ×1

ubuntu ×1