php - JavaScript JSON associative object key and value both as datetime stamp -
my variable date_mplayer stores php generated time() stamp. need create array key/value pair both key , value same time stamp date_mplayer.
what i've got @ moment:
var md = {date_mplayer:date_mplayer}; localstorage.setitem('date_mplayer', json.stringify(md)); if console.log(localstorage); get...
date_mplayer "{"date_mplayer":1427837963}" what need should like:
date_mplayer "{1427837963:1427837963}" background: how pass function commands music player across tabs based on each tab's assigned date. every x number of seconds json object reconstructed updated timestamp tab's key representation; tabs not updated within span of time few seconds longer have keys removed (to prevent eternal growth until hits browser storage limit).
no frameworks.
var md = {}; md[date_mplayer] = date_mplayer; localstorage.setitem('date_mplayer', json.stringify(md));
Comments
Post a Comment