装载没有显示在框内(loading not showing within the box)
在ajax调用期间,我使用jquery和css显示带有灰色背景的加载器。 问题是我需要加载器和灰色背景只能在如下所示的框中可见,并在中心加载文本和图标
我的代码工作正常,但灰色背景的加载器显示整个页面,如下所示。
任何人都可以告诉我一些解决方案
我的代码如下所示
ajaxindicatorstart('loading data.. please wait..'); function ajaxindicatorstop() { $('#resultLoading .bg').height('100%'); $('#resultLoading').fadeOut(300); $('.myBox').css('cursor', 'default'); } function ajaxindicatorstart(text) { if($('.myBox').find('#resultLoading').attr('id') != 'resultLoading'){ $('.myBox').append('<div id="resultLoading" style="display:none"><div><img src="http://w3lessons.info/demo/ajax-indicator/ajax-loader.gif"><div>'+text+'</div></div><div class="bg"></div></div>'); } $('#resultLoading').css({ 'width':'100%', 'height':'100%', 'position':'fixed', 'z-index':'10000000', 'top':'0', 'left':'0', 'right':'0', 'bottom':'0', 'margin':'auto' }); $('#resultLoading .bg').css({ 'background':'#000000', 'opacity':'0.7', 'width':'100%', 'height':'100%', 'position':'absolute', 'top':'0' }); $('#resultLoading>div:first').css({ 'width': '250px', 'height':'75px', 'text-align': 'center', 'position': 'fixed', 'top':'0', 'left':'0', 'right':'0', 'bottom':'0', 'margin':'auto', 'font-size':'16px', 'z-index':'10', 'color':'#ffffff' }); $('#resultLoading .bg').height('100%'); $('#resultLoading').fadeIn(300); $('.myBox').css('cursor', 'wait'); }
I have used jquery and css to show a loader with gray background during an ajax call. The thing is I need the loader and the gray background to be visible only within a box like as shown below with loading text and icon in center
My code is working fine but the loader with gray background is showing for the full page like as shown below.
Can anyone please tell me some solution for this
My code is as given below
ajaxindicatorstart('loading data.. please wait..'); function ajaxindicatorstop() { $('#resultLoading .bg').height('100%'); $('#resultLoading').fadeOut(300); $('.myBox').css('cursor', 'default'); } function ajaxindicatorstart(text) { if($('.myBox').find('#resultLoading').attr('id') != 'resultLoading'){ $('.myBox').append('<div id="resultLoading" style="display:none"><div><img src="http://w3lessons.info/demo/ajax-indicator/ajax-loader.gif"><div>'+text+'</div></div><div class="bg"></div></div>'); } $('#resultLoading').css({ 'width':'100%', 'height':'100%', 'position':'fixed', 'z-index':'10000000', 'top':'0', 'left':'0', 'right':'0', 'bottom':'0', 'margin':'auto' }); $('#resultLoading .bg').css({ 'background':'#000000', 'opacity':'0.7', 'width':'100%', 'height':'100%', 'position':'absolute', 'top':'0' }); $('#resultLoading>div:first').css({ 'width': '250px', 'height':'75px', 'text-align': 'center', 'position': 'fixed', 'top':'0', 'left':'0', 'right':'0', 'bottom':'0', 'margin':'auto', 'font-size':'16px', 'z-index':'10', 'color':'#ffffff' }); $('#resultLoading .bg').height('100%'); $('#resultLoading').fadeIn(300); $('.myBox').css('cursor', 'wait'); }
原文:https://stackoverflow.com/questions/37437842
最满意答案
将_GetCommandLineA更改为_GetCommandLine * W * CommandLineToArgv需要指向UNICODE字符串的指针。
MASM但差不多:
start: push ebp mov ebp, esp sub esp, 4 call GetCommandLineW lea ecx, dword ptr[ebp - 4] ; need the address of local push ecx ; address of local push eax ; pointer to unicode string call CommandLineToArgvW push dword ptr [ebp - 4] ; value of local push offset Format call crt_printf add esp, 8 ; this is all? Then we don't have to restore stack. push 0 call ExitProcess end start
这是输出:
D:\ Projects> ConTest.exe boo boo我见到你了
6
d:\项目>
Change _GetCommandLineA to _GetCommandLine*W* CommandLineToArgv expects a pointer to a UNICODE string.
MASM but just about the same:
start: push ebp mov ebp, esp sub esp, 4 call GetCommandLineW lea ecx, dword ptr[ebp - 4] ; need the address of local push ecx ; address of local push eax ; pointer to unicode string call CommandLineToArgvW push dword ptr [ebp - 4] ; value of local push offset Format call crt_printf add esp, 8 ; this is all? Then we don't have to restore stack. push 0 call ExitProcess end start
and this is the output:
D:\Projects>ConTest.exe boo boo I see you
6
D:\Projects>
相关问答
更多-
如果您可以将RDP应用到实例,那么您可以像使用本地计算机一样使用fusion日志查看器。 只需将以下两个文件复制到Azure实例即可。 FUSLOGVW.exe flogvwrc.dll 这些文件可以在你的本地机器上找到(如果你已经安装了windows SDK): C:\ Program Files(x86)\ Microsoft SDKs \ Windows \ v8.0A \ bin \ NETFX 4.0 Tools \ 1033 显然,该路径的某些部分将取决于您的Windows和.net版本。 正如 ...
-
堆栈主要由CPU来维护(PUSH / POP / CALL / RET命令); 该堆纯粹是一个OS /运行时库功能。 因此,堆叠访问是很自然的。 对于堆访问,您只需从汇编代码(HeapAlloc / HeapFree或其他库)中调用相关的API即可。 与堆栈不同,汇编语言中没有用于堆内存管理的低级原语。 您不必担心Windows上的堆栈大小。 随着您越来越多地使用它,它会变得透明。 在低级方面,Windows在堆栈底部下方设置了一个守卫内存页面(假设堆栈增长缓慢)。 当堆栈到达警戒页面时,会在CPU中生成访 ...
-
要获取程序集的全名,可以使用以下代码(如Romasz所述)。 this.GetType().GetTypeInfo().Assembly.FullName 在UWP中,提交给商店的所有应用程序都将遵循.NET Native。 .NET Native运行时不包含JIT编译器。 因此,必须提前生成所有必需的本机代码。 一组启发式方法用于确定应生成哪些代码,但这些启发式方法无法涵盖所有可能的元编程方案。 有关更多信息,请参阅文章Reflection和.NET Native 。 在您的情况下,我建议您使用资源文件 ...
-
在程序集中CommandLineToArgvW Windows功能的问题(Trouble with CommandLineToArgvW Windows Function in Assembly)[2022-07-08]
将_GetCommandLineA更改为_GetCommandLine * W * CommandLineToArgv需要指向UNICODE字符串的指针。 MASM但差不多: start: push ebp mov ebp, esp sub esp, 4 call GetCommandLineW lea ecx, dword ptr[ebp - 4] ; need the address of local push ... -
GAC程序集已找到但不在C:\ Windows \ assembly \(GAC assembly found but not in C:\Windows\assembly\)[2022-07-28]
看起来dll位于不同的文件夹中。 C:\ WINDOWS \ Microsoft.NET \装配\ GAC_32 \ Oracle.DataAccess \ v4.0_4.112.3.0__89b483f429c47342 \ oracle.dataaccess.dll Looks like the dll was in a different folder. C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess\v4.0_4.112.3.0_ ... -
GNU / Linux由免费软件构成 , bash是免费软件,因此您可以获取源代码并对其进行改进(并且您应该根据GPL许可证发布改进的补丁)。 但是没有公共库这样做,因为shell的作用是将命令行扩展为execve(2)系统调用的参数(然后转到调用程序的main )。 (这在MS-DOS中是不同的,被调用的程序必须扩展其命令行) 函数wordexp(3)接近你想要的。 您可能想要研究更简单的shell的源代码,例如下载sash-3.7.tar.gz GNU/Linux is made of free sof ...
-
MASM32 x86 windows程序集GetCommandLineToArgvW(MASM32 x86 windows assembly GetCommandLineToArgvW)[2022-01-29]
CommandLineToArgvW至少有三个怪癖需要注意: 结果是一个指向宽字符串的指针数组。 MASM32函数crt_printf使用Microsoft VC运行时库(msvcrt.dll)中的函数printf 。 因此,您可以使用大写的“S”作为类型字段字符。 看一下MSDN上的printf Type Field Characters 。 结果是指向字符串的指针数组的第一个元素的地址。 大多数打印函数都需要指向字符串的指针,而不是指向字符串指针的指针。 您必须取消引用该地址才能获得指向该字符串的指针。 ... -
对于Windows Phone 7,它的EventProgress程序集是什么?(What assembly has EventProgress in it for Windows Phone 7?)[2023-06-22]
程序集Microsoft.Threading.Tasks有Microsoft.Progress类,它实现了IProgress 。 它是Microsoft.Bcl.Async包的一部分。 There is the Microsoft.Progress class in assembly Microsoft.Threading.Tasks, which implements IProgress . It is part of the Microsoft.Bcl.Async package. ... -
在Windows 7上组装(assembly on windows 7)[2024-03-16]
听起来更像是你想写一个设备驱动程序? 如果是这样,请从Microsoft下载Windows驱动程序工具包 。 如果您愿意,可以使用它来编写驱动程序。 请注意,这不是一项微不足道的任务。 对您来说可能更好的想法是安装Windows7附带的WinXP虚拟机功能,或者在旧机器上安装WinXP / 98/95,然后对其进行编码。 在这些操作系统下,驱动程序模型更简单,如果需要,您可以直接轻松访问中断和/或轻松将自己提升到Ring 0。 It sounds more like you want to write a ... -
这是一个DOS汇编程序。 对INT 21的调用给出了这一点。 您可以在Linux上组装它,但是您将无法将其链接到DOS可执行文件中,并且无法对其进行测试。 你需要DOS。 幸运的是,您可以在Ubuntu上安装DOSBOX并使用它。 https://help.ubuntu.com/community/DOSBox 然后,你需要得到NASM,它在DOS下工作并安装它http://www.nasm.us/doc/nasmdoc1.html#section-1.3.1 然后得到ALINK,它也支持DOS http: ...