pdf文件名基于用户输入 [英] pdf file name based on user input

查看:83
本文介绍了pdf文件名基于用户输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了pdf文件。我想根据用户输入命名pdf文件。

例如,如果用户输入他的名字为John,那么pdf文件名应该是John.pdf,它应该在新窗口中打开。

我的代码:

pdf1是要存储所有pdf文件的文件夹。

Response.Write(< script type = ''text / javascript''>);

Response.Write(window.open(''pdf1 / AalimAdmission.pdf'',''_ blank''));



Response.Write(< / script>);

解决方案

假设你的文本框id是txt1然后使用





Response.Write();

Response.Write( window.open(''pdf1 /''+ document.getElementById(txt1)。Value +''。pdf'',''_ blank''))

Response.Write( );

i created pdf file. i want to name the pdf file based on user input.
eg, if user types his first name as John, then the pdf file name should be John.pdf and it should be opened in new window.
My code:
pdf1 is the folder where all the pdf files to be stored.
Response.Write("<script type=''text/javascript''>");
Response.Write("window.open(''pdf1/AalimAdmission.pdf'',''_blank'')");

Response.Write("</script>");

解决方案

suppose your text box id is "txt1" then use


Response.Write("");
Response.Write("window.open(''pdf1/''+document.getElementById("txt1").Value+''.pdf'',''_blank'')")
Response.Write("");


这篇关于pdf文件名基于用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆