C,
pasted
on Feb 11:
|
<html>
<head>
<style type="text/css">
#imgdiv
{
background-image:url("img0.jpg");
height: 100%;
width: 100%;
}
</style>
<script src="jquery/jquery-1.5.js"></script>
<script type="text/javascript">
var images_abs = [
"file:///C:/foo/img1.jpg",
"file:///C:/foo/img2.jpg"
];
var images_rel = [
"img1.jpg",
"img2.jpg"
];
function myChangeBG() {
var cur_bgimg = $('#imgdiv').css('background-image');
// doesn't work
var urly = 'url(' + images_rel[0] + ');'
$('#imgdiv').css('background-image', urly );
var diditwork = $('#imgdiv').css('background-image');
// this neither
var urly2 = 'url(' + images_abs[0] + ');'
$('#imgdiv').css('background-image', urly2 );
var bullshit = $('#imgdiv').css('background-image');
// damnit, javascript
$('#imgdiv').css('background-image', 'url(img1.jpg);' );
var ihateyou = $('#imgdiv').css('background-image');
// fuck it all
$('#imgdiv').css('background-image', 'url(file:///C:/foo/img1.jpg);' );
var workploix = $('#imgdiv').css('background-image');
}
$(document).ready( function() {
setInterval( myChangeBG, 1000 );
});
</script>
</head>
<body>
<div id="imgdiv"></div>
</body>
</html>
|
Output:
|
Line 1: error: expected identifier or '(' before '<' token
Line 1: error: invalid preprocessing directive #imgdiv
Line 11: error: expected identifier or '(' before '<' token
Line 22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'images_rel'
Line 27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'myChangeBG'
Line 20: warning: character constant too long for its type
Line 35: warning: character constant too long for its type
Line 13: warning: multi-character character constant
Line 38: warning: multi-character character constant
Line 4: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 20: warning: character constant too long for its type
Line 35: warning: character constant too long for its type
Line 14: warning: multi-character character constant
Line 39: warning: multi-character character constant
Line 4: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 34: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 39: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 34: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 39: warning: character constant too long for its type
Line 20: warning: character constant too long for its type
Line 35: warning: character constant too long for its type
In function '$':
Line 50: error: expected declaration specifiers before '.' token
Line 52: error: expected declaration specifiers before ')' token
Line 54: error: expected declaration specifiers before '<' token
|
|