문제

Salutations! fellow developers, I am kind of stuck in a pickle here. I managed to create a HTML5 animated banner for my blog. After the exported content I received these two files:

i) banner.html --> I can change the name of this to whatever I want and functions perfectly.

ii) sprite.js --> When I change the files name, location and content. The "banner.html" automatically stops to functioning/working.

Is there a possible way that I can just have the "banner.html" file to function properly with my content without the "sprite.js".

-If yes, please share your solution.

-If no, please explain alternative working solution that you deem necessary.

  • Thanks to anyone who had answered.

-LEO

도움이 되었습니까?

해결책 2

Open your banner.html in a text editor. There should be a line line

<script src="sprite.js"></script>

Replace it with

<script>SOURCE_OF_SPRITE.JS</script>

Of course "SOURCE_OF_SPRITE.JS" should be the actual source.

다른 팁

You can include scripts directly into HTML documents with the SCRIPT tag:

Substitute

<script src="sprite.js"></script>

(which has to be somewhere inside the HEAD tag of your document) with

<script>
    <!--

    //contents of sprite.js go here

    //-->
</script>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top