wen0750's recent timeline updates
wen0750

wen0750

V2EX member #403048, joined on 2019-04-19 00:12:51 +08:00
00后菜鸟.在学习php 开发
此问题是否能使用 Java script 解决
JavaScript  •  wen0750  •  Aug 18, 2020  •  Lastly replied by yunser
11
PHP scandir 上的问题
PHP  •  wen0750  •  Feb 4, 2020  •  Lastly replied by wen0750
7
自己好像落后了
生活  •  wen0750  •  Sep 1, 2019  •  Lastly replied by wen0750
18
wen0750's recent replies
Aug 18, 2020
Replied to a topic by wen0750 JavaScript 此问题是否能使用 Java script 解决
add_action( 'wp_footer', 'woosb_footer_js', 99 );
function woosb_footer_js() {
?>
<script type="text/javascript">
jQuery(document).on('found_variation', function(e, t) {
var $product = jQuery(e['target']).closest('.woosb-product');
if ($product.length) {
var $qty = $product.find('input.qty');
if ($qty.val() == 0) {
$qty.val(1).trigger('change');
}
}
});
jQuery(document).on('reset_data', function(e) {
var $product = jQuery(e['target']).closest('.woosb-product');
if ($product.length) {
$product.find('input.qty').val(0).trigger('change');
}
});
</script>
<?php
}




Working for wordpress woocommerce


////////// ** Project END ** \\\\\\\\\
Aug 17, 2020
Replied to a topic by wen0750 JavaScript 此问题是否能使用 Java script 解决
@codehz 好的👍
Aug 17, 2020
Replied to a topic by wen0750 JavaScript 此问题是否能使用 Java script 解决
我在想有没有一个聪明点的方法,因为商品是很多的,不可能每个每个的改,如果是跟 class 的话。网站是用 wordpress 商品是 woocommerce 。有没有比较熟悉的大神网友們能帮一下忙。
Aug 17, 2020
Replied to a topic by wen0750 JavaScript 此问题是否能使用 Java script 解决
document.getElementById("%e7%8f%ad%e6%9c%9f").onchange = function() {myFunction()};

function myFunction() {
var x = document.getElementById("quantity_5f3a585e27291");
x.value = 1;
}
</script>
Aug 17, 2020
Replied to a topic by wen0750 JavaScript 此问题是否能使用 Java script 解决
@mebtte 求教!如果可以的话,麻烦你教我一下🙇
Feb 4, 2020
Replied to a topic by wen0750 PHP PHP scandir 上的问题
<?php
$path = ".";
$dh = opendir($path);
$i=1;
while (($file = readdir($dh)) !== false) {
if($file !="filelist.php" && $file != "." && $file != ".." && $file != "index.php" && $file != ".htaccess" && $file != "error_log" && $file != "cgi-bin") {
$name = str_replace("Sample-","",$file);
echo "<a href='$path/$file'>$name</a><br /><br />";
$i++;
}
}
closedir($dh);
?>
Feb 3, 2020
Replied to a topic by wen0750 PHP PHP scandir 上的问题
@garlics 谢谢大哥你的帮忙。
Feb 3, 2020
Replied to a topic by wen0750 PHP PHP scandir 上的问题
@jugelizi 想问一下大致上要怎么做?
Feb 3, 2020
Replied to a topic by wen0750 PHP PHP scandir 上的问题
@jugelizi 想問一下大致上要怎麼做?
Feb 3, 2020
Replied to a topic by wen0750 PHP PHP scandir 上的问题
<?php
$path = ".";
$dh = opendir($path);
$i=1;
while (($file = readdir($dh)) !== false) {
if($file !="filelist.php" && $file != "." && $file != ".." && $file != "index.php" && $file != ".htaccess" && $file != "error_log" && $file != "cgi-bin") {
echo "<a href='$path/$file'>$file</a><br /><br />";
$i++;
}
}
closedir($dh);
?>
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2363 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 15:49 · PVG 23:49 · LAX 08:49 · JFK 11:49
♥ Do have faith in what you're doing.