简体   繁体   中英

What is find() doing in this HTML page?

I am somewhat unfamiliar with JavaScript and very unfamiliar with Angular, so if you are familiar with these it will be a basic question. I have inherited an HTML form with the following:

<form ng-submit="find()">

SOME STUFF

<button id="find-button" ng-click="find()" ng-show="findBox.findType != FIND_ALL">Search</button>

MORE STUFF

</form>

My question is...what is the find() function doing when the SEARCH button is clicked? Is this some kind of built in function, and if so, what is it doing? I can't find any documentation on it anywhere. Thanks for your time.

The find() function is not predefined. It is user created function in javascript. Go look at your js file and find where it defines the function.

find() is implemented on the page somewhere as a function in that context. You'd have to dig around your JS files to determine what it's doing.

Find the function find in your whole project, try searching for

function find(

or

var find = function(

The one you mentioned above in a comment (in choose-chems.js the $scope.find = function ()) doesn't seem to be the function you are looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM