mirror of
https://github.com/techgaun/active-forks.git
synced 2024-12-22 13:32:14 +01:00
wrap with form
This commit is contained in:
parent
8584e894d4
commit
8e17912802
2 changed files with 13 additions and 6 deletions
14
index.html
14
index.html
|
@ -15,12 +15,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="input-group">
|
<form id="form" class="form-horizontal" role="form">
|
||||||
<input id="repo" class="form-control" type="text" placeholder="techgaun/github-dorks">
|
<div class="input-group">
|
||||||
<span class="input-group-btn">
|
<input id="repo" class="form-control" type="text" placeholder="techgaun/github-dorks">
|
||||||
<button onClick="fetchData()" type="button" class="btn btn-primary">Find</button>
|
<span class="input-group-btn">
|
||||||
</span>
|
<button onClick="fetchData()" type="button" class="btn btn-primary">Find</button>
|
||||||
</div>
|
</span>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div id='data-body' class="">
|
<div id='data-body' class="">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
document.getElementById('form').addEventListener('submit', (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
fetchData()
|
||||||
|
})
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
const repo = document.getElementById('repo').value
|
const repo = document.getElementById('repo').value
|
||||||
const re = /[-_\w]+\/[-_.\w]+/
|
const re = /[-_\w]+\/[-_.\w]+/
|
||||||
|
|
Loading…
Reference in a new issue