OPhone-based Widget online instance Development (2) (1)

Source: Internet
Author: User

Link to OPhone-based Widget online instance Development

2. Add currency selection bar

1) Add a row and three columns to the table in the html file. The Code is as follows:

 
 
  1. <Tr> <Td Align="Right" > <Select Id=
  2. "Currency_left" Onchange= "GetLeftOption (this)
  3. "> <Option Value="CNY">RMB<Option> 
  4. <Option Value="USD">USD Option>... Omitted...
  5. <Option Value="EUR">Euro Option>
  6. Select>  Td> <Td Width="50" Font-size="0.6em">Redeem Td> 
  7. <Td Align="Left" >
  8. <Select Id="Currency_right" Onchange="GetRightOption (this )" > 
  9. <Option Value="CNY">RMB
  10. Option> <Option Value="USD">USD Option> 
  11.  <Option Value="JPY">Yen Option>... Omitted...<Option Value="EUR">Euro
  12. Option>  Select>  Td>  Tr>

The code above mainly refers to creating a row with three columns, and placing the first and third columns in the currency selection Column

2) Add the corresponding code in css

 
 
  1. #currency_left,#currency_right { font-size: 0.8em; }    

Set the font size of the currency selection bar

Then you can save and Run AS to see the effect:

 

3. Add currency amount input Column

1) Add a row and three columns to the table in html.

 
 
  1. <tr> <td align="right" > 
  2. <INPUT id="num_left" type="text" value="1" size="8" > 
  3. td><td width="50"> 
  4. <img id="arrowimg" src="images/forward.png"   
  5. align="center" onclick="calculateCurrency()"> 
  6. img>  td> <td align="left" >   
  7. <INPUT id="num_right" type="text" value="1" size="8" disabled="true">   
  8. td>  tr>    

Create a row and three columns, and place a backward arrow in the second column.

  • Android Widget Development Series
  • Android Widget development details
  • How to Build Activi in Android Widget Development
  • Comprehensive Understanding of Web Widget Development
  • JIL Widget development tutorial

 

Put the input box in the first and third columns, and set the input box in the third column to prohibit the input. In this way, you can only enter the amount in the direction of the arrow from the left, and the converted amount is displayed on the right.

).

Then you can save and Run AS to see the effect:

 


In this way, the layout of the upper part of the interface is complete. Next we will add corresponding event processing in js.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.