【JavaScript】大小写转换|css:输入框发光效果

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<style type="text/css">
	.hh input{
		 outline-style: none ;
    border: 1px solid #ccc; 
    border-radius: 3px;
    padding: 13px 14px;
    width: 620px;
    font-size: 14px;
    font-weight: 700;
    font-family: "Microsoft soft";
	}
	/*设置输入框点击发光效果*/
	.hh input:focus{ 
	transition:border linear .2s,box-shadow linear .5s;
    -moz-transition:border linear .2s,-moz-box-shadow linear .5s;
    -webkit-transition:border linear .2s,-webkit-box-shadow linear .5s;
    outline:none;border-color:rgba(253,215,5,.75); //输入框边框颜色
    box-shadow:0 0 10px rgba(253,215,5,.105); //向外漫射程度1
    -moz-box-shadow:0 0 10px rgba(253,215,5,.5);//向外漫射程度2
    -webkit-box-shadow:0 0 10px rgba(253,215,5,3);//向外漫射程度3 
		/*border-color: #66afe9;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)*/
	}
	.dor input{
		width: 147px; /* 宽度 */
	height: 40px; /* 高度 */
	border-width: 0px; /* 边框宽度 */
	border-radius: 3px; /* 边框半径 */
	background: #1E90FF; /* 背景颜色 */
	cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
	outline: none; /* 不显示轮廓线 */
	font-family: Microsoft YaHei; /* 设置字体 */
	color: white; /* 字体颜色 */
	font-size: 17px;
	}

.dor input:hover { /* 鼠标移入按钮范围时改变颜色 */
	background: #5599FF;
}
</style>
<body>
	<h2>大小写转换</h2>
原数据:<div class="hh"><input type="text" id="old" placeholder="请输入英文字母"></div>
<br>
<div class="dor">
<input type="button" value="转大写" οnclick="supper()">
<input type="button" value="转小写" οnclick="lower()">
</div>
<br>
新数据:<div class="hh"><input type="text" id="new" placeholder="转换后的结果"></div>
</body>
<script type="text/javascript">
	
	function supper(){
		var str=document.getElementById('old').value;
         str=str.toUpperCase();
         document.getElementById('new').value=str; 
	}
	function lower(){
		var str=document.getElementById('old').value;
         str=str.toLowerCase(); 
         document.getElementById('new').value=str;
	}

</script>
</html>

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值