In Axure, a variable is a container for storing data temporarily in axure, and variables include global variables and local variables. Global variables can be manipulated in the use cases of all pages of the Axure prototype. The following is an example of a simple search function to introduce global variables
In the search box, the recommended search content is already default (setting a global variable equals recommending search content)
When the search box gets focus, the search box becomes blank;
When the search box loses focus, if the search box content is blank, let the search display the recommended search content (that is, equal to the global variable), if not blank, then display the search content entered by the user
Step 1:
Create a variable, project-global variable-open the Global Variables window
Step 2:
In the Global Variables window, click on "+", add the variable, named "Textfield", the default value is "Companion network"; Click OK to save and close the global Variables window
Step 3:
Establish the basic framework of the search function: a text box (named "Search box") for the search box, enter the recommended search content in the text box: "Companion net", a rectangle for the search button (named "Search button")
Step 4:
Select the text box (single line), and in the part interaction and Comments window, click on the "Get Focus" event to open the use Case editor
Step 5:
In the use Case editor,
Step One: Use case description--click on "New conditions", open the Condition Generation window, set "Part Text search box (text box) = value" [[[Onloadvariable]]], click "OK" to save and close the "conditional generation" window;
The second step: Click the new action-select "part", click "Set Text";
Step Fourth: Configure the action--Check the "Search box (text box)", set the text value to "";
Click OK to save the settings and close the use Case editor
Step 6:
Select the text box (single line), and in the part interaction and Annotations window, click the "Lost Focus" event to open the use Case editor
Step 7:
In the use Case editor,
Step One: Use case description-click on "New conditions", open the Condition Generation window, set the part Text search box (text box) = value "", click "OK" to save and close the "conditional generation" window;
Step Two: Click Add Action-select "widget" and click "Set Text";
Fourth Step: Configure action-check "search box (text box)", set the text value to "[[[Onloadvariable]]]";
Click "OK" to save the settings and close the use Case editor, as shown in Figure 9;
Make, save, and generate prototype test.
Specific operation video, please go to accompany the website to watch: http://www.pexue.com/Course/newlesson/ebdddef4-0868-4996-be60-8c8d001102b1?specialid= 884cbf83-1e29-4cf7-9cca-b80fe82a1e24
Want to learn Axure's small partners can add US exchange group: 422010371