简体   繁体   English

如何使用输入名称jquery从一页到另一页获取值

[英]How to get value from one page to another page using input name jquery

I want to get the textbox value from one page to another page using input name in jquery. 我想使用jquery中的输入名称将文本框值从一页转移到另一页。

$('input[name$="testName"]').val("@Model.Value")

above this code is not working in another page, please anyone help me. 上面的代码在另一页上不起作用,请任何人帮助我。

您必须在查询字符串中传递值,否则将无法直接访问。

You could save it to an param or save it to an hidden field. 您可以将其保存到参数或保存到隐藏字段。 But you cant access it directly. 但是您不能直接访问它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM