I've been battling with this for a while:
I've got a mysql database of events happening on various weeks. For each event there is a field with the week numbers that it is occurring as a text string.
eg W01-W04, W06, W08, W10
How can i convert that that to an array of values with jquery?
eg W01, W02, W03, W04 ect..
And then how would i replace that row with a row for each week value.
Thanks in advanced.
只需在JavaScript字符串上使用.split()
方法即可:
string.split(',');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.