Difference between revisions of "PlayPhraseMe"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<HTML> | |||
<H1>Please type in a phrase that you want to see it spoken in a movie:</H1> | |||
<input type="text" id="phraseInput" placeholder="Enter phrase"> | |||
}} | |||
<button onclick="searchPhrase()">Search</button> | |||
<H2>A window will open and videos to be played by PlayPhase.me</H2> | |||
<script> | |||
searchInput.addEventListener('keyup', (e) => { | |||
if (e.keyCode === 13) { | |||
searchPhrase(); | |||
} | |||
}); | |||
function searchPhrase() { | |||
const phrase = document.getElementById('phraseInput').value; | |||
// Remove spaces and replace with + | |||
const searchTerm = phrase.replace(/\s/g, '+'); | |||
const srcPrefix = 'http://playphrase.me/#/search?q=' | |||
// Open new tab with search url | |||
window.open(srcPrefix + searchTerm); | |||
} | |||
</script> | |||
</html> |
Latest revision as of 02:43, 17 January 2024
<HTML>
Please type in a phrase that you want to see it spoken in a movie:
<input type="text" id="phraseInput" placeholder="Enter phrase">
<button onclick="searchPhrase()">Search</button>
A window will open and videos to be played by PlayPhase.me
<script> searchInput.addEventListener('keyup', (e) => {
if (e.keyCode === 13) { searchPhrase(); }
});
function searchPhrase() {
const phrase = document.getElementById('phraseInput').value; // Remove spaces and replace with + const searchTerm = phrase.replace(/\s/g, '+'); const srcPrefix = 'http://playphrase.me/#/search?q=' // Open new tab with search url window.open(srcPrefix + searchTerm);
} </script> </html>