Home  >  Article  >  Web Front-end  >  How to use jQuery to read view content in Domino_jquery

How to use jQuery to read view content in Domino_jquery

WBOY
WBOYOriginal
2016-05-16 18:43:561465browse

jQuery is a fast, concise javaScript library that enables users to more easily process HTML documents and events, implement animation effects, and easily provide AJAX interaction for websites or systems.
Using the jQuery framework in Domino can greatly simplify the js code and make the js program more concise and intuitive. Here is a simple example of simply using jQuery to read the view content in the form.
1. Add the following code and built-in HTML to the form:
html code:

< ;div id="ViewContent">

The
button calls the function, and the div is used to receive the view content obtained by the function and display it.
Add the following JavaScript function to the jsheader of the form:

Copy the code The code is as follows:

function GetViewContent(){
var url = server path/database name/view name?readviewentries"
$.get(url,function(data){
var list = "";
list = "
"
if($(data).find("viewentry").size == 0){
} else {
$(data).find("viewentry").each(function (){
if($(this).attr("position") < 11) {
$(this).find("entrydata").each(function(){
if ( $(this).attr("name")=="name")
list ="})
}
})
}
list = "
" $(this).text() " " $(this).next().text() "" $(this).next().next().text() "
"
$("#ViewContent").html(list);
});
}

Note: The prerequisite for this code to run successfully is that you remember to call jQuery in the form .js files.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Instructions for using JavaScript event recording_javascript skillsNext article:Instructions for using JavaScript event recording_javascript skills

Related articles

See more