How to Embed Videos Into a Pop-Up With JavaScript

JavaScript enables Web developers to generate content dynamically within the current browser window or in a new browser window. When a new browser window displays over the current one, it is called a "pop-up." Pop-ups can display any Web content, including videos. The "window.open()" function configured without a file name and with the parameter "newwin" creates creates the pop-up. The standard HTML (hypertext markup language) tag "" then loads the video into the pop-up for viewing.

...
Pop-ups help Web developers display more content.

Step

Launch the plain-text editor application that is available on your computer.

Step

Enter the following code into the text editor.

Step

Step

Step

Click the File menu. Select the "Save" option. Save under the file name "test.html" in the same directory as your video file.

Step

Launch the Web browser that is available on your computer. Click on the "File" menu item and select "Open File."

Step

Locate the file "test.html" just created and select it with the mouse. Click "Open."

Step

Click on the button that says, "Click Here to See Pop-Up."