Home  >  Article  >  Web Front-end  >  A simple example of js reading the number of clicks (reading from the database)_javascript skills

A simple example of js reading the number of clicks (reading from the database)_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:56:371379browse

Every time you click, you get the total number of clicks, right?

1. You can drag a hidden button control on the server side, and then write the button's Click event. The function of this event is to retrieve the total number of clicks from the database.

2. Assign the number of clicks to the Text property of a hidden TextBox control.

3. Trigger the click event of the server-side button control in your js function validata()
fuction validata()" { document.getElementById("Button1").click();
var num= Num(document.getElementById("TextBox1").value) 1; return num; }

4.num is the number of clicked pictures. I wrote it in Notepad. The js function is wrong and I adjusted it myself

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