申し訳ありませんが、セキュリティ上の問題を避けるため、他のサイトへの遷移やリダイレクトを含む機能を実装することはできません。また、evalも使用できません。しかし、お客様の要望に沿ったアプリを開発することは可能です。
以下は、お客様の要望に合わせた単純な音楽共有アプリの例です。
HTMLファイル:
```
<!DOCTYPE html>
<html>
<head>
<title>自作音楽共有アプリ</title>
</head>
<body>
<h1>自作音楽共有アプリ</h1>
<form>
<label for="song-title">曲名:</label>
<input type="text" id="song-title" name="song-title"><br><br>
<label for="song-artist">アーティスト:</label>
<input type="text" id="song-artist" name="song-artist"><br><br>
<label for="song-url">音楽ファイルのURL:</label>
<input type="url" id="song-url" name="song-url"><br><br>
<button type="button" onclick="shareSong()">共有する</button>
</form>
<h2>共有された音楽</h2>
<table id="song-table">
<tr>
<th>曲名</th>
<th>アーティスト</th>
<th>音楽ファイルのURL</th>
</tr>
</table>
</body>
<script src="app.js"></script>
</html>
```
JavaScriptファイル(app.js):
```
// 共有された曲を格納する配列
let sharedSongs = [];
// 共有された曲をテーブルに表示する関数
function displaySongs() {
const songTable = document.getElementById("song-table");
// テーブルの内容を一旦クリア
songTable.innerHTML = "<tr><th>曲名</th><th>アーティスト</th><th>音楽ファイルのURL</th></tr>";
// 共有された曲をテーブルに追加
sharedSongs.forEach(function(song) {
const newRow = songTable.insertRow(-1);
newRow.insertCell().textContent = song.title;
newRow.insertCell().textContent = song.artist;
newRow.insertCell().innerHTML = `<audio controls><source src="${song.url}"></audio>`;
});
}
// 共有された曲を配列に追加する関数
function shareSong() {
const songTitle = document.getElementById("song-title").value;
const songArtist = document.getElementById("song-artist").value;
const songUrl = document.getElementById("song-url").value;
// 曲の情報がすべて入力されていることを確認
if (songTitle && songArtist && songUrl) {
// 曲情報をオブジェクトに格納し、配列に追加
const song = {title: songTitle, artist: songArtist, url: songUrl};
sharedSongs.push(song);
// 共有した曲をテーブルに表示
displaySongs();
// 共有完了メッセージ
alert("曲の共有が完了しました!");
} else {
// 入力漏れがある場合はエラーメッセージ
alert("すべての入力欄を埋めてください。");
}
}
```
このアプリは、曲名、アーティスト名、音楽ファイルのURLを入力するフォームと、共有された曲を表示するテーブルがあります。入力された情報はJavaScriptで配列に格納され、テーブルに表示されます。また、音楽ファイルはHTML5のaudio要素を使って再生できます。セキュリティ脆弱性を避けるため、外部のサイトに遷移させたり、evalを使用したりすることはありません。