[英]Using console in localhost/phpmyadmin
I want to use the console in the element inspector for this page localhost/phpmyadmin, after selecting the database in phpmyadmin, the structure tab will show the tables with checkboxes at their left. 我要使用此页面localhost / phpmyadmin的元素检查器中的控制台,在phpmyadmin中选择数据库后,“结构”选项卡将在表的左侧显示复选框。 I want to use a javascript code in the console to automatically check multiple tables in the list, i tried this 我想在控制台中使用javascript代码自动检查列表中的多个表,因此我尝试了
$('#checkbox_tbl_6, #checkbox_tbl_5').attr('checked', true);
to check specific checkboxes, the console responded 检查特定的复选框,控制台响应
Object { length: 0, prevObject: Object, context: HTMLDocument → index.php, selector: "#checkbox_tbl_6, #checkbox_tbl_5" }
and didn't affect a thing 并没有影响任何事情
also tried this 也尝试过
$('#checkbox_tbl_6').prop('checked', true);
and same outcome, i want to use this because i sync our database everyday and only selected table are needed to be synced, it is frustrating checking specific checkboxes every now and then so i decided to use this.it worked in my pc at home by the way but it didn't work on our office 同样的结果,我想使用它,因为我每天同步我们的数据库,并且只需要同步选定的表,这时不时地检查特定的复选框令人沮丧,因此我决定使用this.it顺便说一句,但是在我们办公室没有用
As what @SLaks stated, the search didn't match anything in the page. 正如@SLaks所说,搜索与页面中的任何内容都不匹配。 The root cause is that the element that i am searching for is positioned inside an iframe. 根本原因是我要搜索的元素位于iframe内。 I loaded the database's structure in another tab so that it won't be enclosed by an iframe, the search worked and i am now able to sync part of my database in a faster way and error free. 我将数据库的结构加载到另一个选项卡中,这样它就不会被iframe包围,搜索成功了,现在我可以更快地同步部分数据库,并且没有错误。
$('#checkbox_tbl_1').prop('checked', true);
I am doing this for almost half a year(syncing selected database tables, looking over a lists of what specific tables should be included over and over), and i am really relieved that this is possible. 我已经进行了将近半年的时间(同步选定的数据库表,反复查看应包含哪些特定表的列表),这让我感到非常欣慰。 Preparing time was reduced from 2 minutes to 5 seconds because of this 因此,准备时间从2分钟减少到5秒
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.