javascript - js cannot retrieve objects like this
某草草
某草草 2017-06-12 09:30:52
0
5
743

Can’t js get objects like this?

string 是变量

是用绑定事件传的值

onmouseout="shubiao_onmouseover('id-del-0')"

function shubiao_onmouseover( string ){
    $("#"+string).find('.info-del').removeAttr('style');
    $("#"+string).find('.info-del').css("display","block");
}
某草草
某草草

reply all(5)
phpcn_u1582

This is a reserved keyword and cannot be used as a variable

学习ing

Yes
<script async src="//jsfiddle.net/Laecous3/1/embed/"></script>

给我你的怀抱

You still shouldn’t be too wild when writing code. Some people say that it’s okay to look at a programmer’s level and see if his code is indented and the naming is standardized. It’s not unreasonable. It is recommended to look at the source code of open source code and look at other people's naming conventions. In short, the basics cannot be overemphasized.

For example, in this example, wouldn’t it be appropriate to directly pass in the selector?

女神的闺蜜爱上我

Naming convention is very important

Variable names are case-sensitive and are allowed to contain letters, numbers, dollar signs ($), and underscores, but the first character is not allowed to be numbers, and spaces and other punctuation marks are not allowed.
The variable name length should be as short as possible, and Seize the key points and try to reflect the value type in the variable name
Try to avoid using meaningless naming
It is forbidden to use JavaScript keywords and reserved word full names
Common variable name naming methods include camel case naming and Pascal naming

三叔

I just want to say what is this

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template