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 class="panel-body">
|
||||
<div class="input-group">
|
||||
<input id="repo" class="form-control" type="text" placeholder="techgaun/github-dorks">
|
||||
<span class="input-group-btn">
|
||||
<button onClick="fetchData()" type="button" class="btn btn-primary">Find</button>
|
||||
</span>
|
||||
</div>
|
||||
<form id="form" class="form-horizontal" role="form">
|
||||
<div class="input-group">
|
||||
<input id="repo" class="form-control" type="text" placeholder="techgaun/github-dorks">
|
||||
<span class="input-group-btn">
|
||||
<button onClick="fetchData()" type="button" class="btn btn-primary">Find</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id='data-body' class="">
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
document.getElementById('form').addEventListener('submit', (e) => {
|
||||
e.preventDefault()
|
||||
fetchData()
|
||||
})
|
||||
|
||||
function fetchData() {
|
||||
const repo = document.getElementById('repo').value
|
||||
const re = /[-_\w]+\/[-_.\w]+/
|
||||
|
|
Loading…
Reference in a new issue