Today I read the article "IE8 's WebSlices" in Blueidea, but I also had a new experience on the day IE8 Beta 1-and the WebSlices experience was different.
Grab fresh Experience Today IE8 Beta 1 (hereinafter referred to as IE8), IE8 provides a lot of good experience, I do not more than that, I just activities, come up with some stuff. One of the activities is that when a user selects a text, immediately appears an arrow tool, this tool can unfold, after the expansion, there are rich services, such as Baidu Search (to add search engine), map search, translation and so on. I should also do something for the user, hehe, of course. Extrapolate, I'll do the music service. Think, if you choose a paragraph of text, click on "Instant listening to music", immediately heard, how good. So, apart, start drawing the UI interface and writing code.
Use Photoshop to find a map to change a bit, so it, concise point good.
In the API page, add:
<a href= "#" title= "" > Add mood Music to instantly listen to songs to ie8</a>
Also upload an XML (service.xml) file with the contents of the file below;
Click on the "Add mood music to listen to songs to IE8" link, the following dialog box appears;
Click on: "Add Provider" (add providers);
Add a hint of success;
Test the butterfly on the selected page, immediately appear the song interface; Haha, happy!!!
XML Core Code:
<?xml version= "1.0" encoding= "UTF-8"?>
<os:openservicedescription xmlns:os= "Http://www.microsoft.com/schemas/openservicedescription
/1.0 ">
<os:homepageUrl>http://www.***.cn/</os:homepageUrl>
<os:display>
<os:name> mood Music Instant listening song </os:name>
<os:icon>http://www.nihaoku.cn/favicon.ico</os:icon>
<os:description> Choose song name to hear songs immediately. </os:description>
</os:display>
<os:activity category= "Discover" >
<os:activityaction context= "Selection" >
<os:preview type= "text" accept-charset= "Utf-8" action= "http://www.***.cn/ff/ie8.htm#{selection}" method= "get"/ >
<os:execute type= "text" accept-charset= "Utf-8" action= "http://www.***.cn/"? {selection} ' method= ' Get '/>
</os:activityAction>
</os:activity>
</os:openServiceDescription>
Detailed Explanation:
The key to the code is that <osreview/> The action that is performed when the mouse hovers over the menu item, using the Get method (method= "get") to UTF-8 encoding (accept-charset= "Utf-8" The selected {selection} text of the type (type= "text") is sent to the address (action);
<os:execute/> This line is the action that you perform when you click on the menu item, and the properties are the same as above.
In this way, I hope you can come up with better services, Microsoft IE8 itself to provide word search, translation, map search services, I believe that IE8 will be more exciting.