0

不太确定我是否理解为什么最简单的 HTML 会给我这个错误: Line: 1 Error: Unable to get value of the property 'appendChild': object is null or undefined

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<TITLE>Sound Cloud demo</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<script src="http://connect.soundcloud.com/sdk.js"></script>
<script>
SC.initialize({
  client_id: 'DMAlex'
});

SC.stream("/test", function(sound){
  sound.play();
});

function SoundCloudCheck(){
alert('Ponit 1');

SC.stream("/test", function(sound){
  sound.play();
});


alert('Ponit 2');

var track_url = 'http://soundcloud.com/forss/flickermood';
SC.oEmbed(track_url, { auto_play: true }, function(oEmbed) {
  console.log('oEmbed response: ' + oEmbed);
});

}
</script>
</head>
<BODY>
Calling local application demo
<INPUT TYPE=BUTTON VALUE="Click me" NAME="Clk"  onclick="SoundCloudCheck();" >
</BODY>
</html>
4

1 回答 1

0

添加

SC.connect(函数() {

  SC.get('/me', function(me) { 

  });

似乎摆脱了错误。

于 2012-07-25T20:13:46.910 回答