Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function addEvent(target, eve, func) {
- if(target.addEventListener)
- target.addEventListener(eve, func)
- else if(target.attachEvent)
- target.attachEvent("on" + eve, func)
- else
- eval(target + ".on" + eve + "=" + func + ";")
- }
- var play = document.getElementById("play");
- var stop = document.getElementById("stop");
- var frame1 = document.getElementById("frame1");
- var frame2 = document.getElementById("frame2");
- function changeFrames(location1, location2) {
- frame1.src = location1;
- frame2.src = location2;
- }
- addEvent(play, "click", function() {
- changeFrames("radio/playerwindow.html", "radio/play.html");
- });
- addEvent(stop, "click", function() {
- changeFrames("radio/stop.html", "radio/stop.html");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement