Git.Storage.Web/Theme/plugins/jquery-validation/test/selects/index.html

(开头部分) 16KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Fun with jQuery</title>

<script src="http://www.google.com/jsapi"></script>
<script>
  google.load("jquery", "1");
</script>

<script type="text/javascript">

$.fn.options = function(selector) {
	return this.each(function() {
		function container(select) {
			if (select.next().is(".option-container")) {
				return $(select).next();
			}
			return $('<select class="option-container" />').append(select.children()).insertAfter(select).hide();
		}
		var container = container($(this));
		$(this).empty().append(container.children(selector).clone());
	});
}

$(document).ready(function(){

	$("#State").hide()

	$("#Country").change(function() {
		var selected = this.options[this.selectedIndex].value;
		if (selected == "US") {
			$("#State").show().options(".state");
		} else if (selected == "CA") {
			$("#State").show().options(".province");
		} else {
			$("#State").hide();
		}
	}).change();


});
</script>



</head>

<body>
Mission:

<xmp>
CODE

</xmp>


    <select size="1" id="Country" name="country">
后面还有 376 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。