<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Local Database Search</title> <style> #searchForm { width: 100%; padding: 10px; margin-bottom: 10px; } #resultsTable { width: 100%; border-collapse: collapse; } #resultsTable th, #resultsTable td { padding: 5px; border: 1px solid #ccc; } #resultsTable thead th { background-color: #f2f2f2; /* Grey background color for header row */ } </style> </head> <body> <h1>Local Database Search</h1> <form id="searchForm"> <input type="text" id="deviceInput" placeholder="Device"> <input type="text" id="downtimeInput" placeholder="Downtime"> <input type="number" id="binInput" placeholder="Bin"> <button type="button" id="searchButton">Search</button> </form> <table id="resultsTable"> <thead> <tr> <th>Date</th> <th>Tester ID</th> <th>Config</th> <th>Device</th> <th>Temperature</th> <th>DT Group</th> <th>Downtime</th> <th>Category</th> <th>Site</th> <th>Bin</th> <th>Test#</th> <th>Solution</th> <th>Case</th> <th>Who</th> <th>Tool Status</th> </tr> </thead> <tbody id="resultsBody"></tbody> </table> <script> const database = [ { Date:"7/7/2023", Tester ID:"E364161", Config:"SVA", Device:"LMC6483", Temperature:"", DT Group:"Prober", Downtime:"Alignment Fail", Category:"B", Site:"", Test Bin:"N/A", Test#:"N/A", Solution:"Reload Wafer", Case:"Repeat", Who:"Mugu", Tool Status:"Production "}, { Date:"7/7/2023", Tester ID:"E364117", Config:"Ti", Device:"LMT70", Temperature:"", DT Group:"Prober", Downtime:"Alignment Fail", Category:"B", Site:"", Test Bin:"N/A", Test#:"N/A", Solution:"Train Target", Case:"New", Who:"Hasbullah", Tool Status:"Production "}, // ... add more here ]; const searchButton = document.getElementById('searchButton'); const deviceInput = document.getElementById('deviceInput'); const downtimeInput = document.getElementById('downtimeInput'); const binInput = document.getElementById('binInput'); const resultsBody = document.getElementById('resultsBody'); searchButton.addEventListener('click', function() { const device = deviceInput.value.toLowerCase(); const downtime = downtimeInput.value.toLowerCase(); const bin = binInput.value.toLowerCase(); const filteredResults = database.filter(chip => { const deviceMatches = chip.device.toLowerCase().includes(device); const downtimeMatches = chip.downtime.toLowerCase().includes(downtime); const binMatches = chip.bin.toLowerCase().includes(bin); return deviceMatches && downtimeMatches && binMatches; }); displayResults(filteredResults); }); function displayResults(results) { resultsBody.innerHTML = ''; if (results.length === 0) { const noResultsRow = resultsBody.insertRow(); const noResultsCell = noResultsRow.insertCell(); noResultsCell.colSpan = 3; noResultsCell.textContent = 'No results found.'; return; } results.forEach(chip => { const row = resultsBody.insertRow(); const deviceCell = row.insertCell(); const downtimeCell = row.insertCell(); const binCell = row.insertCell(); const solution1Cell = row.insertCell(); const solution2Cell = row.insertCell(); const solution3Cell = row.insertCell(); deviceCell.textContent = chip.device; downtimeCell.textContent = chip.downtime; binCell.textContent = chip.bin; solution1Cell.textContent = chip.solution1; solution2Cell.textContent = chip.solution2; solution3Cell.textContent = chip.solution3; }); } </script> </body> </html>
Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML
. You can also specify the stylesheet information in styles.css
tab and scripts information in scripts.js
tab and start coding.
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>