


ajax cross-domain prompt Reload the page to get the source code
ajaxCode:
var mobile = document.myform.b1.value; var email = document.myform.b2.value; var username = document.myform.b3.value + document.myform.b4.value; var count = 10; var ojj; $.<strong>ajax</strong>({ type:'get', url:'http://a.com/app.php', data:{username:username,email:email,mobile:mobile}, cache: false, dataType:'jsonp', jsonp:'callback', jsonpCallback:"success_jsonpCallback", success:function(e){ if(e=='reg_ok'){ $("#reg_fail").addClass('LDisplayNone'); $("#reg_ok").removeClass('LDisplayNone'); $("#popup").show().css("height",$(window).height()); count--; if(count <= 0){ closePopup(); return; } document.getElementById('timeshow').innerHTML = count; ojj=setTimeout(function(){Prompt()},1000); }else{ $("#reg_ok").addClass('LDisplayNone'); $("#reg_fail").removeClass('LDisplayNone'); $("#popup").show().css("height",$(window).height()); count--; if(count <= 0){ closePopup(); return; } document.getElementById('timeshow').innerHTML = count; ojj=setTimeout(function(){Prompt()},1000); } }, error : function(e) { //console.log(e); //有值 } });
app.php 文件
header("Access-Control-Allow-Origin: *");//First Cross-domain access is allowed. If it is *, it means that all addresses can be accessed. If it can only be accessed by a certain address, write the address directly and write the address starting with http.
json_encode($str)
The above introduces the ajax cross-domain prompt. Reload the page to obtain the source code, including ajax content. I hope it will be helpful to friends who are interested in PHP tutorials.

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



The Count function is used to count the number of numbers in a specified range. It ignores text, logical values, and null values, but counts empty cells. The Count function only counts the number of cells that contain actual numbers. The CountA function is used to count the number of non-empty cells in a specified range. It not only counts cells containing actual numbers, but also counts the number of non-empty cells containing text, logical values, and formulas.

On September 3, version 1.5 of the Grand Theft Auto VI document which provides a detailed overview of everything that is known about the game to date. The updated version of the document was announced in a trailer published on X (formerly Twitter).??

Solutions for document.cookie not being obtained: 1. Browser privacy settings; 2. Same-origin policy; 3. HTTPOnly Cookie; 4. JavaScript code error; 5. Cookie does not exist or expires; 6. Cross-domain issues; 7. Viewer mode; 8. Server problems; 9. JavaScript execution timing; 10. Check console log, etc.

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

This article introduces to you the usage differences of MySQL’s Count function. The need for statistical data is very easy to encounter in our daily development. MySQL also supports a variety of calculation functions. Next, let’s take a look at the differences between them. , and whether they have some pitfalls.

The usage of the count function in PHP is: [count(array,mode);], where the parameter array specifies the array to be counted, and the parameter mode specifies the mode of the function.

Introduction to the Document object in JavaScript and code examples: In JavaScript, the Document object is an interface that represents the entire HTML document. It provides access and operation methods to the HTML document. This article will introduce the common methods and properties of the Document object and provide some specific code examples. getElementById method getElementById is an important method of the Document object, used to

The reproduced test database is as follows: CREATETABLE`test_distinct`(`id`int(11)NOTNULLAUTO_INCREMENT,`a`varchar(50)CHARACTERSETutf8DEFAULTNULL,`b`varchar(50)CHARACTERSETutf8DEFAULTNULL,PRIMARYKEY(`id`))ENGINE= InnoDBAUTO_INCREMENT=1DEFAULTCHARSET=latin1;The test data in the table is as follows. Now we need to count the deduplicated columns of these three columns.
