如何使用JavaScript创建一个小小部件

时间:2022-08-26 21:31:45

I really don't know how to describe it, but if you understood it and had experience on that field, may be you can help me with something 'Open Source' and 'Ready-made'.

我真的不知道如何描述它,但是如果你理解它并且在那个领域有经验,那么你可以用“开源”和“现成的”来帮助我。

I want to create something like a box 'or widget', where you can change its content by hitting some buttons on the top of the box. (Hey the box is on a web page and this should use Ajax and Javascript).

我想创建一个类似盒子或小部件的东西,你可以通过点击盒子顶部的一些按钮来改变它的内容。 (嘿,盒子在网页上,这应该使用Ajax和Javascript)。

I have tried some ready scritps, but I found them limited and they drive me crazy, JS frameworks also don't seems to offer such solution. Any body have any idea on that field?

我已经尝试了一些准备好的scritps,但我发现它们有限并且它们让我发疯,JS框架似乎也没有提供这样的解决方案。有没有人知道那个领域?

2 个解决方案

#1


3  

Just because the box is on a Web page doesn't mean it should use AJAX, Omar. Have you thought about using a third-party solution like ClearSpring or WidgetBox? If you need to put your widget onto Myspace, you'll want one of these.

仅仅因为盒子在网页上并不意味着它应该使用AJAX,Omar。您是否考虑过使用ClearSpring或WidgetBox等第三方解决方案?如果你需要把你的小部件放到Myspace上,你会想要其中一个。

That said, I've taken a couple of JavaScript-only runs at this problem; see Twitterati and Put Your Digg In A Box for examples, and my Global Widget Summit presentation for explanations.

也就是说,我已经针对这个问题采取了几个JavaScript运行;有关示例,请参阅Twitterati并将您的Digg放在一个盒子中,以及我的Global Widget Summit演示文稿以获得解释。

#2


1  

Have you tried Jquery?

你试过Jquery吗?

Visit www.jquery.com

Some example can be found at http://www.openjs.com/scripts/events/keyboard_shortcuts/

可以在http://www.openjs.com/scripts/events/keyboard_shortcuts/找到一些示例。

Also please check the In-place editing example at http://www.appelsiini.net/projects/jeditable http://docs.jquery.com/Tutorials:Edit_in_Place_with_Ajax

另请查看http://www.appelsiini.net/projects/jeditable http://docs.jquery.com/Tutorials:Edit_in_Place_with_Ajax上的就地编辑示例

#1


3  

Just because the box is on a Web page doesn't mean it should use AJAX, Omar. Have you thought about using a third-party solution like ClearSpring or WidgetBox? If you need to put your widget onto Myspace, you'll want one of these.

仅仅因为盒子在网页上并不意味着它应该使用AJAX,Omar。您是否考虑过使用ClearSpring或WidgetBox等第三方解决方案?如果你需要把你的小部件放到Myspace上,你会想要其中一个。

That said, I've taken a couple of JavaScript-only runs at this problem; see Twitterati and Put Your Digg In A Box for examples, and my Global Widget Summit presentation for explanations.

也就是说,我已经针对这个问题采取了几个JavaScript运行;有关示例,请参阅Twitterati并将您的Digg放在一个盒子中,以及我的Global Widget Summit演示文稿以获得解释。

#2


1  

Have you tried Jquery?

你试过Jquery吗?

Visit www.jquery.com

Some example can be found at http://www.openjs.com/scripts/events/keyboard_shortcuts/

可以在http://www.openjs.com/scripts/events/keyboard_shortcuts/找到一些示例。

Also please check the In-place editing example at http://www.appelsiini.net/projects/jeditable http://docs.jquery.com/Tutorials:Edit_in_Place_with_Ajax

另请查看http://www.appelsiini.net/projects/jeditable http://docs.jquery.com/Tutorials:Edit_in_Place_with_Ajax上的就地编辑示例