开发者

javascript update via external xml or txt possible?

开发者 https://www.devze.com 2023-04-05 19:50 出处:网络
I have a javascript countdown. The first line is: dateFuture1 = new Date(2011,8,21,20,30,0); 开发者_JS百科

I have a javascript countdown. The first line is:

dateFuture1 = new Date(2011,8,21,20,30,0);
开发者_JS百科

is it possible to update the date and time values via external text file or XML feed and if so, what would it look like?

Would something simple as

2011,8,21,20,30,0

inside a text file be possible?

Thank you in advance


You would need some method of accessing the values within the text or XML file, but yes it is possible. I would suggest looking into the ajax() function within jQuery as it is fully capable of handling your request. You can also utilize JSON to help pass values to the client from the server, which in my opinion is the best way to go.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号