好的,这就是代码.当我运行它.它只有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) 我首先在终端中输入此命令,将目录更改为终端,然后当我尝试打开 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)
请帮忙