开发者

javascript update via external xml or txt possible?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜