WebApplication/Template/PC/index.js

(开头部分) 5KB

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

$(function () {


    $(".my_select").each(function () {
        $(this).attr("tabindex", "0").attr("hidefocus", "true").attr("onblur", "hide_se(this)");
    })


	//判断浏览器是否支持placeholder属性
  	supportPlaceholder='placeholder'in document.createElement('input'),
 	placeholder=function(input){
 		var text = input.attr('placeholder'),
    	defaultValue = input.defaultValue;
 		if(!defaultValue){
 			input.val(text).addClass("phcolor");
    	}
 		input.focus(function(){
	 		if(input.val() == text){
	   			$(this).val("");
	      	}
    	});
	 	input.blur(function(){
 			if(input.val() == ""){
       			$(this).val(text).addClass("phcolor");
      		}
    	});
 	//输入的字符不为灰色
	    input.keydown(function(){
	  		$(this).removeClass("phcolor");
	    });
  	};
 	//当浏览器不支持placeholder属性时,调用placeholder函数
  	if(!supportPlaceholder){
 		$('input').each(function(){
	 		text = $(this).attr("placeholder");
	 		if($(this).attr("type") == "text"){
	 			placeholder($(this));
	      	}
	 		if($(this).attr("type") == "password"){
	 			placeholder($(this));
	      	}
    	});
  	}
  	
  	$(".new_input input").bind("focus",function(){
  		$(this).parent().addClass("select")
  	})
  	$(".new_input input").bind("blur",function(){
  		$(this).parent().removeClass("select")
  	})

  	$(".blue_login").click(function () {
  	    if ($("#cardidtxt").val() == "")
  	    {
  	        layer.alert('用户名不能为空!', { icon: 2, kin: 'layer-ext-moon', closeBtn: 0, success: function () { $(':focus').blur(); } });
  	    }
  	    else if ($("#passtxt").val() == "") {
  	        layer.alert('密码不能为空!', { icon: 2, kin: 'layer-ext-moon', closeBtn: 0, success: function () { $(':focus').blur(); } });
  	    }
  	    else if ($("#codetxt").val() == "") {
后面还有 104 行代码,购买后查看完整代码

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

AI 解读

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

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