Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
想将当前 url 复制到一个文本框中并在它之前创建一个提示
我已将课程分配给表单中的文本框
有没有办法使用接近以下的东西来完成这项工作?
$('.txtbox').val(window.location.pathname);
谢谢
这应该有效:
$('.txtbox').val(window.location.href);