html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div align="center">
<img style="width:50%;margin-top:10px;" src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png">
</div>
<form name="form" onsubmit="gs(this,event)">
<input name="search" type="text" value="pets" style="width:70%;margin-left:10%;margin-top:30px;" placeholder="Google search">
<input type="submit" value="Search">
</form>
<script>
function gs(el,e) {
e.preventDefault();
if(el.search.value!=='') {
//window.open(`https://www.google.com/search?q=${el.search.value}`,"_self");
window.location.href= `https://www.google.com/search?q=${el.search.value}`
}
}
</script>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run