Skip to content

Instantly share code, notes, and snippets.

@gknasln
Last active November 2, 2018 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gknasln/9a2370cac7412c38f063b8a7682749a1 to your computer and use it in GitHub Desktop.
Save gknasln/9a2370cac7412c38f063b8a7682749a1 to your computer and use it in GitHub Desktop.
Untitled
body{
background: rgb(220, 200, 200);
}
.container{
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#excel-table{
border: none;
column-space: 0;
}
#excel-table tr:nth-child(1){
background: aliceblue;
}
tr{
border-bottom: 1px solid black;
}
<div class="container">
<table id="excel-table">
<tr id="area-row"></tr>
</table>
<div>
var data = ['Kayıt tarihi', 'isim', 'telefon', 'email'];
function createTitles(titles){
var areaRow= document.getElementById('area-row');
areaRow.innerHTML = '';
for(let i = 0; i < titles.length; i++){
var newCell = newRow.insertCell(areaRow.cells.length);
var text = document.createTextNode(titles[i]);
newCell.appendChild(text);
}
}
alert(findFieldName(data[1]));
function findFieldName(word){
if(!word || word == ''){
return 'empty';
} else if(checkNameField(word)){
return 'name';
} else {
return false;
}
}
function checkNameField(data){
var word = data.toLowerCase();
if(word == 'name'){
return true;
}else if(word == 'isim'){
return true;
}else if(word == 'ismi'){
return true;
}else if(word == 'ad'){
return true;
}else if(word == 'adı'){
return false;
}
}
function checkSurnameField(data){
const word = data.toLowerCase();
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"javascript"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment