خرید بک لینک

Vote count: 0

hi guys i have this dbase i try for long time to add a value on already exist value but i can't .. here is the dbase enter image description here

i use this code.. to find the right key..but in don't know how to add new value

 
    var key = localStorage.getItem('keysearch'); 
    //data to search

var dbRequest = indexedDB.open('medica', 1);
dbRequest.onsuccess = function(event) {
  
  
  var db = this.result;
var db = dbRequest.result;
  var db = event.target.result;

    
var transaction = db.transaction(['user'], 'readonly');
  var objectStore = transaction.objectStore('user');

  var myIndex = objectStore.index('nome'); 
  var getRequest = myIndex.get(key);
    
 
  myIndex.openCursor().onsuccess = function(event) {
    var cursor = event.target.result;
      
    if( cursor) {
        
    
      var checkn = cursor.value.nome;

     
         if (checkn === key) {
            
     // found the key need to insert new value 

    } 
        
      cursor.continue();
    } 
      
  };
};
     }

any idea to add value in index farmaco ? regards !

asked 21 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 19 تير 1395 ساعت: 3:23

صفحه بندی