Home > front end >  Why don't give input in jQuery CSS styles?
Why don't give input in jQuery CSS styles?

Time:09-19

CodePudding user response:

Can I use this code you tried under



<meta charset="utf-8"/& gt;
<script SRC="https://bbs.csdn.net/topics/jquery.min.js" type="text/javascript" & gt; </script>


<body>
1111111111 & lt;/div>



$(function () {
$(" input "). The focus (the function () {
This CSS ({' border ':' 1 px solid blue '});
})

$(" input "). The blur (function () {
This CSS ({' border ':' 1 px solid red '});
})
});
</script>

CodePudding user response:

reference 1st floor usecf response:
can I use this code you tried under



<meta charset="utf-8"/& gt;
<script SRC="https://bbs.csdn.net/topics/jquery.min.js" type="text/javascript" & gt; </script>


<body>
1111111111 & lt;/div>



$(function () {
$(" input "). The focus (the function () {
This CSS ({' border ':' 1 px solid blue '});
})

$(" input "). The blur (function () {
This CSS ({' border ':' 1 px solid red '});
})
});
</script>


But I how to show not to come out here? But it is ok to use addclass,,

CodePudding user response:

Border of CSS style ({' border ':' 1 px solid blue '}), your letters are spelt wrong

CodePudding user response:

Writing is no problem, that is, border style solid into a soild, so border didn't take effect

CodePudding user response:

reference 4 floor xiaoxiang dream response:
writing there is no problem, is the border style solid into a soild, so border didn't take effect

Ok, thank you, thank you
  • Related