Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
sssioon authored Nov 6, 2024
1 parent ca679bd commit edfa111
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ <h1>输入需要编辑的网页网址</h1>
document.getElementById('editButton').addEventListener('click', () => {
const url = document.getElementById('urlInput').value.trim();
if (url) {
window.location.href = "editor.html?url=" + encodeURIComponent(url);
// 跳转到 editor.html,并传递 URL 参数
window.location.href = `editor.html?url=${encodeURIComponent(url)}`;
} else {
alert('请输入网址');
}
Expand Down

0 comments on commit edfa111

Please sign in to comment.