当前位置: 移动技术网 > IT编程>开发语言>JavaScript > jQuery之按钮组件的深入解析

jQuery之按钮组件的深入解析

2019年05月06日  | 移动技术网IT编程  | 我要评论
按钮: $(selector).button([options]); . 代码如下: <!doctype html public "-//w3c//dtd

按钮:
$(selector).button([options]);

. 代码如下:


<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "https://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>buttonicon</title>
<link rel="stylesheet" type="text/css" href="themes/ui-lightness/jquery.ui.all.css"/>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/jquery.ui.button.js"></script>
<script>
$(document).ready(function(){
$("input,button").button({
icons: {
primary: "ui-icon-locked"
// secondary: "ui-icon-triangle-1-s"
}
});
$("a,p").button({
icons: {
secondary: "ui-icon-triangle-1-s"
}
});
});
</script>
<style>
body{ padding:30px; font-size:9px; }
</style>
</head>
<body>
<input type="button" value="button 1" />
<input type="submit" value="submit button" />
<button>button 2</button>
<input type="checkbox" id="check1" /><label for="check1">check 1</label>
<input type="radio" id="radio1" /><label for="radio1">radio1</label>
<a>anchor</a>
<p>div</p>
</body>
</html>


效果图: \

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网