Home >Web Front-end >HTML Tutorial >Beautification checkbox_html/css_WEB-ITnose in HTML page

Beautification checkbox_html/css_WEB-ITnose in HTML page

WBOY
WBOYOriginal
2016-06-24 11:49:131424browse

Many artists often use pictures instead of checkboxes to beautify the page when designing pages.

The html is as follows:

<div class="checklayout">	<div class="checkbox01">		<img src="../images/checkbox01_noclick.png" name="hobby" id="01">	</div><div class="checkword01">苹果</div>


How to get the value at this time?

jquery:

		var hobby; 		var obj = $("img[name='hobby']");		if ("../images/checkbox01_click.png" == obj.attr("src");) {			hobby = obj.attr("id");		}




My personal blog: http://blog.caicongyang.com;

My personal website: http://www.caicongyang.com;

My CSDN blog address:





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