Home  >  Article  >  Backend Development  >  data-type,data-url,data-toggle,作用是什么?

data-type,data-url,data-toggle,作用是什么?

WBOY
WBOYOriginal
2016-06-06 20:10:401376browse

看到一段代码: <a data-type="ajax" data-url="view/ps" data-toggle="modal" data-title="View"> </a>我点击了链接之后,弹出了一个窗口。

不过我没理解为什么就弹出了窗口呢,是ajax起作用了,还是modal起作用了。谁能解释一下,这段代码是什么意思?

回复内容:

看到一段代码: <a data-type="ajax" data-url="view/ps" data-toggle="modal" data-title="View"> </a>我点击了链接之后,弹出了一个窗口。

不过我没理解为什么就弹出了窗口呢,是ajax起作用了,还是modal起作用了。谁能解释一下,这段代码是什么意思?

Data Api是一个能在DOM对象中存储数据的新物种,目前很多js库都利用了这个特性,具体实现的功能要看调用这块代码的js库了。

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