


Various refreshes of jquerymobile partial rendering_html/css_WEB-ITnose
在JQueryMobile页面在第一次初始化进行一次整体渲染,动态生成的需要局部渲染。
在jquerymobile实现listview局部渲染的方法:
Java代码
- function queryPublishOrderList(trackOrDealOrInsp,userCode,type,pageNum){
- var queryPublishOrderListURL="http://xxx.xxx.xxx.xxx/Myapp/WorkOrderSelByTypeService.svc/WorkOrderSimpSelByType/Json/"+trackOrDealOrInsp+"/"+userCode+"/"+type+"/"+pageNum;
- $.ajax({
- type: 'get',
- dataType : "json",
- url: queryPublishOrderListURL,
- contentType: 'application/json',
- data: [],
- success: function(data) {
- var sb = new StringBuffer();
- $.each(data, function(i,item){
- //创建一个工单列表行对象
- sb.append("
- ");
- sb.append("
- "+item.work_orders_id+""+i+" ");
- sb.append("
- ");
- sb.append(""+item.work_orders_id+"");
- sb.append(""+item.founder_na+"");
- sb.append(""+item.found_time+"");
- sb.append(""+item.type_na+"");
- sb.append(""+item.work_cont+"");
- sb.append(" ");
- sb.append("");
- }); 🎜> },
- error:function(XMLHttpRequest, textStatus, errorThrown){
- alert("Request remote service error!");
- },
- Complete: function( ) { 🎜>}
- Note:
- listview is refreshed for jquerymobile for listview component.
- $("div[data-role=content] ] ul").listview();
- If you want to refresh the li inside the listview, you can use
- $("div[data-role=content] ul li").listview(" refresh");
jquerymobile listviewcannot call methods on listview prior to initialization; attempted to call method 'refresh'
jquerymobile checkbox needs to be refreshed in time to obtain its accurate value
Java code
Generally available when logging in There are two checkbox multi-select boxes for remembering username and remembering password
Using jquerymobile to make the page, when the checkbox is checked, it cannot always get its correct value.
Solution:
$('input[type="checkbox"]').bind('click',function() {
- $(this).prop('checked').checkboxradio("refresh"); // The binding event updates the checked value of the checkbox in time
- });
- If you want to use js to change the value of the checkbox, you must refresh it in time.
- $('input [type="checkbox"]').attr('checked',false).checkboxradio("refresh");
- $('input [type="checkbox"]').attr('checked',false).checkboxradio("refresh");
- Reason: Because it is manual jquerymobile cannot re-render after changing its value. In this way, the value displayed on the page is different from the actual value. (jquerymobile hides the form elements, and then uses js to add some elements to beautify the effects of input, select, textarea and other elements)
- Refresh the drop-down box
- Java code
- $("#selectbox").html(optionList).selectmenu('refresh', true);
Java code
-
- Check button
- $("input[type='checkbox']").attr("checked",true).checkboxradio("refresh");
- Radio button group:
- $("input[type='radio']").attr("checked",true).checkboxradio("refresh");
- Select list::
- var myselect = $("select#foo");
- myselect[0].selectedIndex = 3;
- myselect.selectmenu("refresh");
- Slider
- $("input[type=range]").val(60).slider ("refresh");
- switch (they use slider):
- var myswitch = $("select#bar");
- myswitch [0].selectedIndex = 1;
- myswitch .slider("refresh");
select disable style
button disabled style

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When you browse the web on your iPhone, the loaded content is temporarily stored as long as the browser app remains open. However, the website updates content regularly, so refreshing the page is an effective way to clear out old data and see the latest published content. This way, you always have the latest information and experiences. If you want to refresh the page on iPhone, the following post will explain you all the methods. How to Refresh Web Pages on Safari [4 Methods] There are several methods to refresh the pages you are viewing on the Safari App on iPhone. Method 1: Use the Refresh Button The easiest way to refresh a page you have open on Safari is to use the Refresh option on your browser's tab bar. If Safa

Is the F5 key not working properly on your Windows 11/10 PC? The F5 key is typically used to refresh the desktop or explorer or reload a web page. However, some of our readers have reported that the F5 key is refreshing their computers and not working properly. How to enable F5 refresh in Windows 11? To refresh your Windows PC, just press the F5 key. On some laptops or desktops, you may need to press the Fn+F5 key combination to complete the refresh operation. Why doesn't F5 refresh work? If pressing the F5 key fails to refresh your computer or you are experiencing issues on Windows 11/10, it may be due to the function keys being locked. Other potential causes include the keyboard or F5 key

1. First open the design plan to be rendered in Kujiale. 2. Then open top view rendering under the rendering menu. 3. Then click Orthogonal in the parameter settings in the top view rendering interface. 4. Finally, after adjusting the model angle, click Render Now to render the orthogonal top view.

Page refresh is very common in our daily network use. When we visit a web page, we sometimes encounter some problems, such as the web page not loading or displaying abnormally, etc. At this time, we usually choose to refresh the page to solve the problem, so how to refresh the page quickly? Let’s discuss the shortcut keys for page refresh. The page refresh shortcut key is a method to quickly refresh the current web page through keyboard operations. In different operating systems and browsers, the shortcut keys for page refresh may be different. Below we use the common W

Vue page rendering is asynchronous. Vue uses asynchronous rendering, which can improve performance; if asynchronous updates are not used, the current component will be re-rendered every time the data is updated. For performance reasons, Vue will asynchronously update the view after this round of data updates.

Vue error: v-html cannot be used correctly to render dynamic HTML code. How to solve it? Introduction: In Vue development, we often need to dynamically render HTML code to display rich text content or dynamically generated user input. Vue provides the v-html directive to implement this function. However, sometimes we may encounter problems that cannot correctly render dynamic HTML code using v-html. This article will explore the causes of this problem and provide solutions. Problem description: In Vue, when we use v

Vue error: Unable to correctly use v-html to render HTML code, how to solve it? Vue is a popular JavaScript framework that can help us build interactive user interfaces. In Vue, we can use the v-html directive to render HTML code into templates. However, sometimes we may encounter a problem: the HTML code cannot be rendered correctly using v-html. This article will describe some common causes and solutions to help you solve this problem. The first possible reason is that the

The solution to the value disappearing after the react page is refreshed: 1. Refresh the page and check whether the data in the state will be cleared; 2. Use the "const name = location.query.name; const id = location.query.id;" method By adding parameters to the jump link, you can pass the parameters and refresh the page without losing the data.
