Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the ajaxjs functions used in PJBLOG

Shulou Source: shulou.com Published: 2022-06-03 05:37:27 11月17日 Update

This article mainly introduces which ajaxjs functions are used in PJBLOG, which are very detailed and have certain reference value. Friends who are interested must finish reading them.

Function $(id)

{

Return document.getElementById (id)

}

Function echo (obj,html)

{

$(obj) [xss_clean] = html

}

Function fopen (obj)

{

$(obj) .style.display = ""

}

Function fclose (obj)

{

$(obj) .style.display = "none"

}

Function createxmlhttp ()

{

Var xmlhttp=false

Try {

Xmlhttp = new ActiveXObject ("Msxml2.XMLHTTP")

}

Catch (e) {

Try {

Xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP")

}

Catch (e) {

Xmlhttp = false

}

}

If (! xmlhttp & & typeof xMLHttpRequestrated undefined) {

Xmlhttp = new XMLHttpRequest ()

If (xmlhttp.overrideMimeType) {/ / set the MiME category

Xmlhttp.overrideMimeType ('text/xml')

}

}

Return xmlhttp

}

Function getdata (url,obj1,obj2)

{

Var xmlhttp=createxmlhttp ()

If (! xmlhttp)

{

Alert ("your browser does not support XMLHTTP clients!")

Return

}

Xmlhttp.onreadystatechange=requestdata

Xmlhttp.open ("GET", url,true)

Xmlhttp.send (null)

Function requestdata ()

{

Fopen (obj1)

Echo (obj1, "loading data, please wait a moment.")

If (xmlhttp.readyState==4)

{

If (xmlhttp.status==200)

{

If (obj1 updated obj2) {fclose (obj1);}

Echo (obj2,xmlhttp.responseText)

}

}

}

}

These are all the contents of the article "what are the ajaxjs functions used in PJBLOG". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Use function content article value interest guy partner data more browser knowledge category industry information information channel channel reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information NVidia Linux Shulou Tech Info