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");
}
给我你的怀抱2017-06-12 09:32:52
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?
女神的闺蜜爱上我2017-06-12 09:32:52
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